Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\test\admin_check.php:1) in C:\AppServ\www\test\admin_check.php on line 14
Code
<?
include "connect.php";
@session_start();
$user = $_POST["user"];
$pass = $_POST["pass"];
$sql = "select * from login";
$ex = mysql_query($sql, $conn);
while ($rs = mysql_fetch_array($ex)){
if (($user == $rs["username"]) and ($pass == $rs["password"])) {
$_SESSION["username"] = $user;
$_SESSION["password"] = $pass;
$show = header ("location:admin_home.php"); // มีปัญหาบรรทัดนี้อะครับแนะนำด้วยครับ
} else {
$show = "<H1>Your username or password is invalid</H1>";
}
}
echo $show;
mysql_close($conn);
?>