Hi there. I am using this code to register a session if the password is correct.
<?php
If($Submit){
If(strtoupper($txtUserName) != strtoupper("asd") && strtoupper($txtPassword) != strtoupper("asd")){
$Msg="Incorrect Username/Password Combonation";
header("Location: login.php?Msg=$Msg");
}else{
session_start();
session_register("Session");
header("Location: index.php");
}
}
?>
This is the only code on this page... there is no HTML at all, but when this page runs i get 5-6 error messages saying
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/httpd/html/allsites/asd.com/contestants/login2.php:1) in /home/httpd/html/allsites/asd.com/contestants/login2.php on line 7
What can i do to rememdy this situation? Thanks alot!😃