Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\app\connect\connect.php:10) in C:\AppServ\www\app\manager\login.php on line 20
Code (PHP)
<?
session_start();
include '../connect/connect.php';
$strSQL = "SELECT * FROM account WHERE Username = '".trim($_POST['txtUsername'])."'
and Password = '".trim($_POST['txtPassword'])."'";
$objQuery = mysql_query($strSQL);
$objResult = mysql_fetch_array($objQuery);
if(!$objResult)
{
echo "Username and Password Incorrect!";
}
else
{
$_SESSION["UserID"] = $objResult["UserID"];
session_write_close();
{
header("Location:index.php") ;
}
}
?>