search.php~
socketmud/www/search.php~ · 877 B
From the archive MySQLMud.tar.gz
Download the archive « Back to the archive contents
<?
include("config.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM vand_help";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
echo "<title>Search Vandagard's Help files</title.";
echo "<b><center>Valid Help terms:</center></b><br><br>";
$i=0;
while ($i < $num) {
$keywords=mysql_result($result,$i,"keywords");
echo " $keywords  ";
$i++;
if ($i % 3)
echo "<br>";
}
echo "<br><br>";
?>
<form action="results.php" method="post">
Choose Search Type:<br />
<select name="search">
<option value="keywords">City</option>
<option value="text">Description</option>
<option value="catagory">Catagory</option>
</select>
<br>
Enter Search Term:<br>
<input name="searchterm" type="text">
<br>
<input type="submit" name="submit" value="submit">
</form>