hey
i have a login form that looks like this:
<?php
if(!isset($_POST['submit'])) {
//form here
}
else {
//code here
}
?>
now in the code i check for errors in the fields like usuall. If an error is found, like the text in the password field is to short, then it need to be redirected to the login page with page.php?error=something.
but i cant use header(location: page.php?error=something) because headers already send by.
Also i dont want the code in a seperated file for some reasons.
And i want the error be displayed at the login form.
how can i do this? please help me.