ok, i got this off of a tutorial as well. it seems thoes scripts are old
it gives me the following error:
Here be the code:Code:Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /usr/home/homtek/public_html/dclamp/results.php on line 15
it starts on: http://dclamp.homtek.net/search.htmlPHP Code:<html>
<head>
<title>Search Results</title>
</head>
<body>
<h2>Search Results</h2>
<br>
<?
$dbh=mysql_connect ("localhost", "homtek_dclamp", "moiola");
mysql_select_db ("homtek_HomTekSQL1");
$query = "SELECT * FROM users WHERE user LIKE '%".$name."%'";
$result = mysql_query($query);
while ($record = mysql_fetch_assoc($result)) {
while (list($fieldname, $fieldvalue) = each ($record)) {
echo $fieldname.": <b>".$fieldvalue."</b><br>";
}
echo "<br>";
}
?>
<br>
<a href="search.html">Click here to go back to the search page</a>
</body>
</html>





Reply With Quote