mysql_fetch_array
| From: | nate at 1feehosting dot com | Date: | Thu, 06 Sep 2001 08:39:46 +0000 |
| Subject: | mysql_fetch_array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-66169@lists.php.net to get a copy of this message | ||
Can someone tell me what i'm doing wrong here?
<?php
//Connect to db
$db = mysql_pconnect("localhost","login","pass");
mysql_select_db("database",$db);
//Check for the IP
$result2 = mysql_query("SELECT ip FROM ip where ip = '$REMOTE_ADDR'",$db);
while($myrow<>mysql_fetch_array($result2))
{
echo "Print some text here!";
}
?>
Basically I just want to print text if the IP address was not found in the database, and if it was
found then I want to print "Print some text here!"
Please help!
Thanks,
Nate