A
Anonymous
Guest
if(mysql_num_rows($result)>0
You don't seem to have a closing bracket on this if!
You don't seem to have a closing bracket on this if!
here is my code.....the one in bold is having error!!!!
if(empty($email) || !eregi("^[A-Za-a0-9\_]+@[A-Za-z0-9\_-]+[A-Za-z0-9\_-]+.*",$email))
{
$errmsg .="<li>$email doesn't looks like a valid email address\n";
}
else
{
//if the format is OK, check to see if this user has already
//signed the guesrtbook.Multiple entries are not allowed.
$query = "select * from guestbook where email = '$email'";
$result = safe_query($query);
if(mysql_num_rows($result)>0
{
$errmsg = "<li>$email has already signed this guestbook.\n";
}
}//perform a very simple check on the format of the url supplied
//by he user (if any)
if (!empty($url) && !eregi("^http://[A-Za-z0-9\%\?\_\:\~\/\.-]+$",$url))
{
if(mysql_num_rows($result)>0
{
$errmsg = "<li>$email has already signed this guestbook.\n";
}
<?php
if(mysql_num_rows($result)>0)
{
$errmsg = "<li>$email has already signed this guestbook.\n";
}
?>
tags are screwed up on the board right now. Check out my sig. Ack.)
if() { }
// then fill in the if condition and start to fill in the block
if($conditionvar == 1) {
echo "something";
while() { }
}
// then fill in the while() condition and start to fill in its block
if($conditionvar == 1) {
echo "something";
while(afunction()) { }
}
// then finish the function parameters and the while block
if($conditionvar == 1) {
echo "something";
while(afunction($a) && $b) {
echo "there be dragons here..";
}
}