why do you think the session isn't working? If there is a run time error in
'file' then an error would be reported and the output terminated. If you
have error reporting off then you would expect to get eactly what you see.
Sounds like a problem inside 'file'.
Tim Ward
St Ives
May be the session is diable in the php.ini
Félix garcía renedo wrote:
Hello,
I have a problem with php sessions.
I have a php file like:
?
session_start();
session_register('pagina');
?
html
head
...
/head
body
?
include('file');
?
...
/html
I have done diferent
From the PHP docs...
=
?php
session_register (count);
$count++;
?
Hello visitor, you have seen this page ?php echo $count; ? times.p;
?php
# the ?=SID? is necessary to preserve the session id
# in the case that the user has disabled cookies
?
To continue, A
I'd like to post a follow-up to my previous message on this subject.
Please still CC me when replying, thanks.
New test code:
?php
session_start();
if (!isset($HTTP_SESSION_VARS['counter'])) {
$HTTP_SESSION_VARS['counter'] = 1;
} else {
$HTTP_SESSION_VARS['counter']++;
}
if
Your problem is very simple. You're beginning a new session every
execution, without checking if a session is already going. So every time it
comes back around it's looking for the variables in the current session,
which every time just began.
Check for an existing session first like:
5 matches
Mail list logo