Quote
Password
Retype Password
I am currently using code as follows:
if(isset($_POST("username"))){
$username = trim(strip_tags($_POST("username")));
if(isset($_POST("password"))){
$password = trim(strip_tags($_POST("password")));
if(isset($_POST("passwordverify"))){
$passwordverify = trim(strip_tags($_POST("passwordverify")));
if(isset($_POST("email"))){
$email = trim(strip_tags($_POST("email")));
if($_POST("password" == $_POST("verifypassword"))) {
// if everthing is correct continue processing
} else {
echo "No username entered";
} else {
echo "no password entered";
} else {
echo "You forgot to retype your password";
} else {
echo "no email entered";
} else {
echo "both passwords entered don't match";
}
}
}
}
}
Is there a better way of doing this short of writing a bunch of if statements? Any assistance would be greatly appreciated.
Sincerely,
Aleeious

New Topic/Question
Reply



MultiQuote






|