Connecting Tech Pros Worldwide Forums | Help | Site Map

Confirm email box

Newbie
 
Join Date: Jan 2008
Posts: 5
#1: Dec 1 '08
Hi,
I have absolutely no experience using Java but guess this is whats needed. I simply want to add a "confirm email" box to my PHP message form. It would check the entered value against the "email address" box and if not matching display a message saying "email address does not match, please check and try again"

Any help very much appreciated

Warder

Expert
 
Join Date: Nov 2006
Posts: 392
#2: Dec 2 '08

re: Confirm email box


It sounds like you are talking about a web form. If that is the case then you need JavaScript, not Java.
hsn's Avatar
hsn hsn is offline
Familiar Sight
 
Join Date: Sep 2007
Location: Dubai-UAE
Posts: 237
#3: Dec 2 '08

re: Confirm email box


it is a simple function in php with java script. but shouldn't you post your question in a php forum???

kind regards
hsn
Nepomuk's Avatar
Moderator
 
Join Date: Aug 2007
Location: Germany
Posts: 2,466
#4: Dec 2 '08

re: Confirm email box


I will happily move this question to JavaScript, PHP or any other forum. I guess that JavaScript would be the better choice, but you choose.

Greetings,
Nepomuk
Expert
 
Join Date: Nov 2006
Posts: 392
#5: Dec 2 '08

re: Confirm email box


What you are wanting is pretty simple. I would just Google for some JavaScript validation examples w/ check boxes. There are lots of examples out there.
Newbie
 
Join Date: Jan 2008
Posts: 5
#6: Dec 3 '08

re: Confirm email box


Thanks for all your help guys, sorry if it was in the wrong thread. If anyone else finds this useful then post it to the Javascript forum.

I have now found a solution by Google form validation techniques, found this website that was really useful

CodeLifter.com - JavaScript Email Address Checker-Validator

Once again thanks for your replys and sorry if it was in the wrong place :-(

Warder
Nepomuk's Avatar
Moderator
 
Join Date: Aug 2007
Location: Germany
Posts: 2,466
#7: Dec 3 '08

re: Confirm email box


No problem. I've moved the thread to the JavaScript Forum now.

Greetings,
Nepomuk (Moderator)
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#8: Dec 3 '08

re: Confirm email box


Quote:

Originally Posted by warder21 View Post

I have now found a solution by Google form validation techniques, found this website that was really useful

CodeLifter.com - JavaScript Email Address Checker-Validator

I'll just point out that the email address checking should be forgiving so that someone could enter any valid email. Server-side checking should also be present, of course, for the real, complete validation. Two more quick points:
1. Use the type attribute of the script tag: language is deprecated.
2. Use the onsubmit event handler for calling the validation function where you can return true for submission and false for preventing submission.
Reply