What is wrong??????
| From: | phpu | Date: | Mon, 14 Jul 2003 16:26:19 +0000 |
| Subject: | What is wrong?????? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-155142@lists.php.net to get a copy of this message | ||
I have this script to login to site:
......................
if ($_POST['email'] == "" || $_POST['password'] == "")
{
print 'Email or password cannot be blank !<br><a
href="user_login.php">Back</a>';
exit;
}
include ("connect_mysql.php");
$crpass=md5($_POST['password']);
$sql = "SELECT * FROM users WHERE email='".$_POST['email']."'
AND password='".$crpass."'";
$result= mysql_query($sql);
if(mysql_num_rows($result) != 1)
{
print 'Name or password do not match!<br><a
href="user_login.php">Back</a>';
exit;
}
mysql_close($connect);
session_start();
$_SESSION['email']=$_POST['email'];
$_SESSION['password']=$crpass;
$_SESSION['key_login']= session_id();
................................................................
Every time i run this script i got this error:( my apache server is very well cofigured)
Warning: Cannot send session cookie - headers already sent by (output started at
c:\apache\htdocs\proiect_gsm\login.php:11) in c:\apache\htdocs\proiect_gsm\login.php on line 81