在服务器站点的php中发出警告的原因 [英] Reason for warning in php at server site
本文介绍了在服务器站点的php中发出警告的原因的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at C:\inetpub\vhosts\outboxnews.co.in\httpdocs\admin.php:3) in C:\inetpub\vhosts\outboxnews.co.in\httpdocs\admin.php on line 4
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\inetpub\vhosts\outboxnews.co.in\httpdocs\admin.php:3) in C:\inetpub\vhosts\outboxnews.co.in\httpdocs\admin.php on line 4
我的代码是
my code is
<?php
session_start();
include("connect.php");
$u_name = $_POST['email'];
$u_pass = $_POST['pwd'];
if ($_POST['Submit']=='Login')
{
$sql = "SELECT * FROM user WHERE
username = '$u_name' AND
password = '$u_pass'";
$result = mysql_query($sql) or die (mysql_error());
$cmd=mysql_fetch_array($result);
$num = mysql_num_rows($result);
if ($num)
{
$_SESSION['username'] = $u_name;
echo "META HTTP-EQUIV=Refresh Content=0; URL=a.php";
exit;
}
else
{
$errore_msg="Your username or Password is incorrect";
}
}
?>
推荐答案
u_name =
u_name =
_POST [' 电子邮件'];
_POST['email'];
u_pass =
u_pass =
这篇关于在服务器站点的php中发出警告的原因的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文