[請益] php的問題
請大大能否幫我看一下下面的程式
<body>
<?
include_once("sql_connect.php");
include_once("my_msg.php");
?>
<?
//檢核資料
if($_POST['id']=='' or $_POST['password']==''){
my_msg("欄位不可空白","admin_login.html");
}
$sqlstr="select * from admin where id ='".$_POST['id']."' and password =
'".$_POST['password']."'";
$result = mysql_query($sqlstr,$link);
$row = mysql_fetch_array($result);
if(mysql_num_rows ($result)){
setcookie("cookie_chk", "admin_logined");
setcookie("cookie_id", $_POST['id']);
my_header("adm.php"); // 管理者登入
}else{
my_msg("登入失敗,請重新登入","admin_login.html");
}
mysql_free_result($result);
mysql_close($link);
?>
<form method="post"></form>
</body>
能否幫我看一下是那裡出了問題
其執行結果是
Warning: Cannot modify header information - headers already sent by (output
started at D:\AppServ\www\danshui\member\admin_chk.php:3) in
D:\AppServ\www\danshui\member\admin_chk.php on line 22
Warning: Cannot modify header information - headers already sent by (output
started at D:\AppServ\www\danshui\member\admin_chk.php:3) in
D:\AppServ\www\danshui\member\admin_chk.php on line 23
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 163.21.78.208
推
02/07 16:39, , 1F
02/07 16:39, 1F
討論串 (同標題文章)
PHP 近期熱門文章
PTT數位生活區 即時熱門文章