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');
> ?>
>
>
> ...
>
>
> include('file');
> ?>
> ...
>
>
> I have done diferent proofs a
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 Di
>From the PHP docs...
=
Hello visitor, you have seen this page times.;
is necessary to preserve the session id
# in the case that the user has disabled cookies
?>
To continue, click here
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
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:
if(!(ses
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:
"
");
echo(sprintf("You have visited this page %d times!", $counter2) . "");
echo(sprintf("You have visited this page %d times!", $_SESSION['counter3']) . "");
?>
"
5 matches
Mail list logo