This is a search I wrote, which will be looking for a unique email address in a database and bring back the fields that I asked for (for 1 record). I believe I have done the right thing using mysql_results (please advise if not..)
My problem comes when the e-mail address does not exist.. It brings up an error about not being able to select that record.
I need an "if" written in PHP so i can script what to do if the e-mail address is not registered.
Thanks in advance,PHP Code:
$query = "SELECT `user_id`, `user_email`, `username` FROM `database` WHERE `user_email` = '$_POST[email]'";
$result = mysql_query($query);