search.php
socketmud/www/search.php · 825 B
From the archive MySQLMud.tar.gz
Download the archive « Back to the archive contents
<title>Vandagard: On-line Help system</title>
<b><center>Vandagard: On-line Help system</center></b><br>
<?
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 "Valid Help terms:<br>";
$i = 0;
while ($i < $num)
{
$keywords=mysql_result($result,$i,"keywords");
$link1 = "<a href=\"results.php?term=$keywords\">$keywords</a>   ";
echo $link1;
$i++;
}
echo "<br><br>";
?>
<form action="help_results.php" method="get">
<p>Enter Search Term: <input type="text" name="term" /></p>
<p><input type="submit" /></p>
</form>