results.php
socketmud/www/results.php · 1.0 KB
From the archive MySQLMud.tar.gz
Download the archive « Back to the archive contents
<title>Vandagard Help Results for <? echo htmlspecialchars($_GET['term']);?></title>
<b><center>Vandagard Help Results for term '<? echo htmlspecialchars($_GET['term']);?>'<br><br></center></b>
<a href="help_search.php">Back to Search Page</a>
<?
include("config.inc.php");
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "SELECT * FROM `vandagard`.`vand_help` WHERE keywords LIKE '%" . htmlspecialchars($_GET['term']) . "%'";
$result=mysql_query($query);
$num=mysql_numrows($result);
mysql_close();
$i=0;
while ($i < $num) {
$keywords=mysql_result($result,$i,"keywords");
$text=mysql_result($result,$i,"text");
$id=mysql_result($result,$i,"id");
$level=mysql_result($result,$i,"level");
$catagory=mysql_result($result,$i,"catagory");
$webtxt=mysql_result($result,$i,"webtxt");
echo "<table border=\"2\" cellspacing=\"10\" cellpadding=\"1\">";
echo "<TR>";
echo "<TD WIDTH=\"10%\">$keywords</TD><TD WIDTH=\"90%\">$webtxt</TD>";
echo "</TR>";
$i++;
}
?>