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

Reply via email to