Forum Moderators: coopster

Message Too Old, No Replies

Verification fields

verify pass and email

         

djtwo

4:02 pm on May 25, 2006 (gmt 0)

10+ Year Member



Hi, I have a signup PHP to MySQL program with all the standard information for a new customer to make an accout. I am using the email as "username" or "Member ID". I would like to verify the email and password twice to make sure the New client put the correct info in. I have seen that script somewhere and spent yesterday trying to find it, but no luck. Can someone please show me the code I could use to verify that data was entered correctly.

Also, where would I put the code.
The script is long so I just included an external link. Thanks for all the help beforehand. Have a good day.

[edited by: jatar_k at 4:07 pm (utc) on May 25, 2006]
[edit reason] no urls thanks [/edit]

jatar_k

4:10 pm on May 25, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



do you mean just having 2 textboxes for them on your login form and then comparing them in your script?

djtwo

4:29 pm on May 25, 2006 (gmt 0)

10+ Year Member



hmmmm....I never thought of it that way, it seems to be even a better and simpler way than I was thinking it would be. Yes that would be great. Thanks Jatar

What I was thinking, you know since I have a the validation code in PHP, I never thought that it would work the same way with the HTML form. Would it be a java function?

Here is the form code, can you please guide me to what the code would be and where I would place the code. Thanks again!

[edited by: jatar_k at 4:31 pm (utc) on May 25, 2006]
[edit reason] no urls thanks [/edit]

djtwo

4:33 pm on May 25, 2006 (gmt 0)

10+ Year Member



I apologize Jatar, I didn't catch that last part of your post where you edited my URL. Should I paste the code here, I am just worried about doing that because it would take up much space. The URL didn't have any website of mine on it, in case you were wondering. Thanks for the understanding.

jatar_k

4:34 pm on May 25, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



you just make 2 textboxes for each then name them something like

password1 and password2
email1 and email2

you can then just add another validation check to see if the value from each of the paired fields is equal

you still need to check the other things for those fields but your first checks could be

whether email 1 and 2 are equal
whether password 1 and 2 are equal
then carry on with what you are doing now in your processing script

<added>I looked at the url both times ;)
what usually works best is to boil down your code to what isn't working. In this case it is a logic question so the code isn't really necessary

djtwo

4:39 pm on May 25, 2006 (gmt 0)

10+ Year Member



would that validation check be in the actual HTML FORM CODE or in the php code (in that script), like I have for the validation for zip, phone, name, etc. in the script php script itself?

So I would place that validations check BEFORE, the other validation check (for format etc.)?

And would I give an error message if something was not the equal?

Thanks!

djtwo

4:41 pm on May 25, 2006 (gmt 0)

10+ Year Member



Thanks for the advice on "boiling down the code", I have difficulty doing that, I guess that is why I just like to paste the whole thing, but I'll work on it, Thanks again Jatar!

jatar_k

4:41 pm on May 25, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



in your php code

before you make your format checks you would make sure they are the same then use only one of each pair for format checks

if they are not equal then I would give an error message maybe

"the passwords you entered did not match"

or something like that and the same for the emails

djtwo

4:46 pm on May 25, 2006 (gmt 0)

10+ Year Member



I'll give it a shot and get back to you with any problems. Thanks!

PS: what language do they speak in your part of Canada? "vous parlez français?"

jatar_k

4:47 pm on May 25, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



je parle les deux

but english mostly around here ;)

djtwo

4:51 pm on May 25, 2006 (gmt 0)

10+ Year Member



nice,...hahaha...I actually just looked up the translation at googles language tools section, but, I'm learning things everyday. But, now I got to get back to work.