thebeam Posted April 24, 2006 Share Posted April 24, 2006 Im profissionalizing and making more accurate the form that my company have. I need to know, how can i do the email check, if it is real. and how i make the re-enter email check, to make more secure that ppl put the right email? Link to comment Share on other sites More sharing options...
pulpfiction Posted April 24, 2006 Share Posted April 24, 2006 This javascript function will check if the email is in the correct format (validates email addr). I guess this is what you are looking for..function test(src) { var emailReg = "^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$"; var regex = new RegExp(emailReg); return regex.test(src); } Link to comment Share on other sites More sharing options...
thebeam Posted April 24, 2006 Author Share Posted April 24, 2006 yes, this is first part of my needs.thanks a lot.the second one is, i have the 2 fields:Email Address:Re-Enter Email Address:What i want, is if ppl doenst put the same information on the two boxes, it doesn't allow to submit. Link to comment Share on other sites More sharing options...
justsomeguy Posted April 24, 2006 Share Posted April 24, 2006 if ($email != $confirm_email) //error code Link to comment Share on other sites More sharing options...
thebeam Posted April 25, 2006 Author Share Posted April 25, 2006 Where i put this ? if ($email != $confirm_email)//error codeOn the PHP File, or the Form File ?And, how could i make caracters check?To have only number in the age box, the zip code.not allow one letter, or empty spaces in the text field ? Link to comment Share on other sites More sharing options...
scott100 Posted April 25, 2006 Share Posted April 25, 2006 Where i put this ? if ($email != $confirm_email)//error codeOn the PHP File, or the Form File ?<{POST_SNAPBACK}> it's using $ so that means it's phpYou may want to try creating your own: Regular Expressions Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now