Sheawh [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have started a session using session_start();
but it returns :
Warning: Cannot send session cookie - headers already sent by (output
started at c:\inetpub\wwwroot\diary\index.php:7) in
even Example: page1.php
I got the same result,
and what if i set session auto start ??
is that means it starts a new session when accessing a HTML?
HTML
?php
// page1.php
session_start();
echo 'Welcome to page #1';
$_SESSION['favcolor'] = 'green';
$_SESSION['animal'] = 'cat';
you have to have the session_start before ANY output, including
html, so do this
?
session_start()
?
html
On Thu, 22 Jul 2004 00:56:44 +0800, Sheawh
[EMAIL PROTECTED] wrote:
even Example: page1.php
I got the same result,
and what if i set session auto start ??
is that means it starts a
even Example: page1.php
I got the same result,
and what if i set session auto start ??
is that means it starts a new session when accessing a HTML?
HTML
?php
// page1.php
session_start();
echo 'Welcome to page #1';
$_SESSION['favcolor'] = 'green';
$_SESSION['animal'] =
Simply do the same thing in the other script. Create a session named
'testsess' and register the variable (under the same name) to it. That
variable will auttomatically take up the it was set to previously.
--
Uchendu Nwachukwu
newsreply AT unndunn DOT com - www.unndunn.com
Deval Parikh [EMAIL
5 matches
Mail list logo