note 97448 added to function.session-start
| From: | djshine94 at gmail dot com | Date: | Tue, 20 Apr 2010 12:56:35 +0000 |
| Subject: | note 97448 added to function.session-start | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-168448@lists.php.net to get a copy of this message | ||
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 ;)
----
Server IP: 82.177.164.100
Probable Submitter: 109.243.239.226
----
Manual Page -- http://www.php.net/manual/en/function.session-start.php
Edit -- https://master.php.net/note/edit/97448
Del: integrated -- https://master.php.net/note/delete/97448/integrated
Del: useless -- https://master.php.net/note/delete/97448/useless
Del: bad code -- https://master.php.net/note/delete/97448/bad+code
Del: spam -- https://master.php.net/note/delete/97448/spam
Del: non-english -- https://master.php.net/note/delete/97448/non-english
Del: in docs -- https://master.php.net/note/delete/97448/in+docs
Del: other reasons-- https://master.php.net/note/delete/97448
Reject -- https://master.php.net/note/reject/97448
Search -- https://master.php.net/manage/user-notes.php