Warning: Cannot modify header information – headers already sent by (output started at C:Program FilesxampphtdocsStaffLogin.php:6) in C:Program FilesxampphtdocsStaffLogin.php on line 29.
Throw the above Warning not executing the code………..
header(“location:
Even not send data to the browser.
<?PHP
$uNameErr = $pwdErr = “”;
$name = $pwd = “”;
if ($_SERVER[“REQUEST_METHOD”] == “POST” && $
$action=-1;
if (empty($_POST[“txtUName”])) {
$uNameErr = “Name is required” ;
} else {
$name = test_input($
}
if (empty($_POST[“txtPwd”])) {
$pwdErr = “Password is required”;
} else {
$pwd = test_input($
$action=1;
}
if($action==1){
header(“location:
}
How to avoid this error.
Regards,
Sivakumar