Forum Moderators: coopster
// Check matching of username and password.
$result=mysql_query("select * from users where username='$username' and password='$password'");
if(mysql_num_rows($result)!='0'){ // If match.
setcookie("user", $username, $time+3600);
session_register("password");
header("location:main.php"); // Re-direct to main.php
exit;
}else{ // If not match.
$message="--- Incorrect Username or Password ---";
}
} // End Login
The error it says is ::
Notice: Undefined index: action in C:\Program Files\Apache Group\Apache2\htdocs\virtual\index.php on line 19
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\virtual\index.php:19) in C:\Program Files\Apache Group\Apache2\htdocs\virtual\index.php on line 102
Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Apache Group\Apache2\htdocs\virtual\index.php:19) in C:\Program Files\Apache Group\Apache2\htdocs\virtual\index.php on line 104
Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0