PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?
if(!$r_uid)
{$error = "You must enter a username to send the PM to.";
$forward = "back";
error_box($error, $forward);}
elseif(!$title)
{$error = "You must enter a title.";
$forward = "back";
error_box($error, $forward);}
elseif(!$message)
{$error = "You must enter a message.";
$forward = "back";
error_box($error, $forward);}
elseif(mysql_fetch_row(mysql_query("SELECT uid, username FROM unz_users WHERE username = '$r_uid'")))
{echo "success!";
//DO SEND HERE
}
else
{$error = "Somethings gone wrong!";
$forward = "back";
error_box($error, $forward);}
?>
The problem Im having is this; The user can put in multiple names to send the PM to, hence if I put more than one r_uid then theres no username with azz0r;john...Any help much appreciated.
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/azz0r/public_html/pages/PM/replying.php on line 18 (link 18 being the query...)