Hi Everyone, This is really bugging me, Im trying to make a database with AOL Instant Messenger users, where people can put in their screen names, etc.. But I Keep getting the errors..
Warning: Supplied argument is not a valid MySQL result resource in /home/xpcorp/public_html/aimlist.php on line 24
Warning: Supplied argument is not a valid MySQL result resource in /home/xpcorp/public_html/aimlist.php on line 25
Here Is My Code.. Can anyone tell me whats wrong!?!
<head>
<title>
Screen Name Database V1.0
</title>
<br>
<center>
<?
$usr = "xpcorp_chris";
$pwd = "galloway";
$db = "xpcorp_test";
$host = "localhost";
$cid = mysql_connect($host,$usr,$pwd);
if (!$cid) { echo ("ERROR: " . mysql_error() . "\n"); }
?>
<?
$category = "aim";
$SQL = " SELECT * FROM aim ";
$SQL = $SQL . " WHERE category = '$category' ";
$retid = mysql_db_query($db,$SQL,$cid);
if (!retid) { echo ( mysql_error() ) ; }
$row = mysql_fetch_array($retid) ;
while ($row = mysql_fetch_array($retid)) {
$name = $row["name"];
$url = $row["url"];
$aim = $row["aim"];
echo ("<b>Name:</b> $name<br><b>Homepage:</b> <a href='$url'>$url</a><br><b>AIM:</b> $aim<br><br>\n");
}
echo ("</DT></P>");
?>