April 6th, 2011, 04:00 AM
Check if email exists in MySQL database
I am working on a site where a user will input an email address, it will then need to be checked whether or not that email exists in a database, and only if it exists can the user continue. What I would like ideally is an input field where the user writes the email, then below that a line which shows either green for 'email found' or red 'email not found, try again'. I also want the user to be unable to continue if the email field is filled in, but giving the 'not found' message.
I have been searching for hours for a tutorial on this, but so far could not find any.
Any help would be greatly appreciated!
April 7th, 2011, 03:35 AM
Re: Check if email exists in MySQL database
You need AJAX for that. Upon entering the email address, you need to run a script that will check your database for the existing email address and return the response back to the browser. For that, jQuery would help you a lot.
Also take a look at:
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!