MySQL

Status
Not open for further replies.

swrpg

New Member
Messages
31
Reaction score
0
Points
0
i am making a game and for the registration how do i code it so that the email answer and the confirm email answer need to be the same or it needs to be retyped? Please answer asap, thank you in advance if i don't get around to it
 

Chris S

Retired
Messages
2,055
Reaction score
1
Points
38
basically do something like this

make 2 fields. email and email2

do this in php

PHP:
$email = $_POST['email'];
$email2 = $_POST['email2'];
if (($email) == $email2){
$error = '0';
}else{
$error = '1';
}

if (($error) == '0'){
//register script
}else{
echo 'You had 1 or more errors. Please fix them';
}
 
Status
Not open for further replies.
Top