The session_start() needs to come before any code outputs anything to
the browser, so in your case you need to put it before the html and
body tags:
?php
session_start();
?
html
body
?
etc...
Padraig
Kirk Babb wrote:
Here's my code:
html
body
?php
//trying to start a session
Aljosa Mohorovic wrote:
session cookie exists on client side and it is set to last 5 days.
the problem is that after some time session data expires. cookie
on client side exists ($PHPSESSID), but session data on server side
does not exists.
i think that the answer is something like:
Am in need of help or I will loose my sanity!!! Im runnin Php 4.1.2 with
Apache 1.3.22 on Win32 with register_globals set to off. My script is as
follows:
?
session_start();
$myVar = Something;
$HTTP_SESSION_VARS[mySessionVar] = $myVar;
?
If I check the cookie, its completely empty. Now if
3 matches
Mail list logo