By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,747 Members | 1,778 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,747 IT Pros & Developers. It's quick & easy.

Confirm email box

P: 5
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
Dec 1 '08 #1
Share this Question
Share on Google+
7 Replies


Expert 100+
P: 392
It sounds like you are talking about a web form. If that is the case then you need JavaScript, not Java.
Dec 2 '08 #2

hsn
100+
P: 237
hsn
it is a simple function in php with java script. but shouldn't you post your question in a php forum???

kind regards
hsn
Dec 2 '08 #3

Nepomuk
Expert 2.5K+
P: 3,112
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
Dec 2 '08 #4

Expert 100+
P: 392
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.
Dec 2 '08 #5

P: 5
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
Dec 3 '08 #6

Nepomuk
Expert 2.5K+
P: 3,112
No problem. I've moved the thread to the JavaScript Forum now.

Greetings,
Nepomuk (Moderator)
Dec 3 '08 #7

acoder
Expert Mod 15k+
P: 16,027
@warder21
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.
Dec 3 '08 #8

Post your reply

Sign in to post your reply or Sign up for a free account.