View Single Post
  #2 (permalink)  
Old 16-04-2008, 22:25
DavidAllen's Avatar
DavidAllen DavidAllen is offline
Premium Member
 
Join Date: Jan 2007
Location: Amersham
Posts: 336
Send a message via MSN to DavidAllen Send a message via Skype™ to DavidAllen
Default

When the user submits the form - first do a call to the database
PHP Code:
$sql=select from TABLE_NAME where email="'.$_POST[email].'";
$Result=mysql_query($sql$link_id); 
Then see if any records are returned (use mysql_num_rows($Result) )- if none then you know the email is unique and you can go ahead and accept it. If a record is returned from the query, then you know that the email address has already been used and display the appropriate error message to the user
__________________
David Allen - www.serina.co.uk
Reply With Quote