PHP Validation Message Appearing in Header

Hello! My form validation message (i.e. You Could Not Be Logged In, etc.) is appearing in the header after user submits the form, where no one can see it. How do I get message to appear in body (beneath form)?. Code below. Screen shot attached for clarification. Thanks!

[php]
} else {
echo “
You could not be logged in! Either the username and
password do not match or you have not validated your membership!
Please try again!
”;
include ‘login_form.html’;
}
[/php]


Just echo the error message wherever you want it to appear

i would set the error as a var and then call it in the login_form.html…

[php]} else {
$error = “
You could not be logged in! Either the username and
password do not match or you have not validated your membership!
Please try again!
”;
include ‘login_form.html’;
}[/php]
put something like this in the login_form.html
[php]if (!$error =’’){
/* if the error is empty /
…login…
}else{
/
display the error */
echo $error;
}[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service