note 97448 rejected from function.session-start by visualmind
| From: | visualmind@php.net | Date: | Tue, 20 Apr 2010 14:08:40 +0000 |
| Subject: | note 97448 rejected from function.session-start by visualmind | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-168451@lists.php.net to get a copy of this message | ||
Note Submitter: djshine94 at gmail dot com
----
I have problem...
Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent
by (output started at C:\Documents and Settings\Lost DJ\Pulpit\httpd\index.php:7) in C:\Documents
and Settings\Lost DJ\Pulpit\httpd\logowanie.php on line 3
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers
already sent (output started at C:\Documents and Settings\Lost DJ\Pulpit\httpd\index.php:7) in
C:\Documents and Settings\Lost DJ\Pulpit\httpd\logowanie.php on line 3
I don't understand what is this :/
I'm a baby on programming in PHP...
This is the file logowanie.php...
<?php
session_start();
if (isset($_POST['konto']) and isset($_POST['password']) )
{
require('conn.php');
$konto=mysql_real_escape_string(trim($_POST['konto']));
$password=mysql_real_escape_string(trim($_POST['password']));
if ($konto!="" and $password!="")
{
$password = sha1(md5($password));
$zapytanie="SELECT id FROM user WHERE login='$konto' and password
='$password'";
$temp=mysql_query($zapytanie) or die("WystÄ
piÅ bÅÄ
d");
$ile=mysql_num_rows($temp);
$temp=mysql_fetch_array($temp);
$id=$temp['id'];
if ($ile==1)
{
$_SESSION['user_id']=$id;
$_SESSION['login']=$konto;
echo ('ZostaÅeÅ poprawnie zalogowany.<head>
<meta http-equiv="Refresh" content="5; url=panel.php" />
</head>');
}
else echo ('PodaÅeÅ zle dane. Kliknij wstecz aby sprobowac ponownie. <head>
<meta http-equiv="Refresh" content="5; url=index.php" />
</head>');
}
}
?>
Please, help me... and I excuse for my english ;)