PDA

View Full Version : check if email exists before inserting record


jay
09-03-2009, 09:34 AM
Hi

I have a website with registration.

I would like to know what is the best way to check if user already exist on the DB before inserting the record.

Thanks

edbr
09-03-2009, 10:50 AM
are you using php?

jay
09-03-2009, 02:48 PM
yes I am using PHP

edbr
09-04-2009, 02:42 AM
then you could use a condition
dont know your layout but something like


if($_POST{'email'==$row{'email)
{
echo "this email address already exists":;

}

jay
09-05-2009, 01:38 PM
Thank you, it's quite simple I should have been able to have resolved it myself.

Thanks again.