Re: session not working on a php page



I have tried the new code


<?php
session_start();
if (isset($_SESSION['counter']))
$_SESSION['counter']++;
else
$_SESSION['counter'] = 1;
echo $_SESSION['counter'];
?>

enabled the error trapping and there is no errors.

There is no output before the session_start, the code is as is on the
php page. I have had a loook through firebug and the cookie is there
too.

Can someone use this code on a webpage and refresh the page to see if
it works. If it does can you please send me a link. Would be great
help, this is killing me :)

Kind regards
Suman
.



Relevant Pages

  • Re: session not working on a php page
    ... Suman wrote: ... php page. ... Can't send you a link - it's on my development system, ... When you say you "enabled error trapping" - did you add the lines I recommended to your php.ini file? ...
    (comp.lang.php)
  • Re: session not working on a php page
    ... enabled the error trapping and there is no errors. ... have you deliberately inserted a fatal run-time error ... php page. ... This suggests that there is no output before the script. ...
    (comp.lang.php)
  • Re: New error for me, cant figure it out.
    ... Just for future reference, this is how you should remove a certain ... Kind regards, ... If he wanted to unset it. ...
    (comp.lang.php)
  • Re: MAthML
    ... > calculate in PHP. ... > Kind Regards, ... of MAthML before...) ... did you search on groups too in google? ...
    (comp.lang.php)
  • RE: [PHP] file() ignores PHP tags
    ... [PHP] fileignores PHP tags ... I wanna output several kinds of ascii files. ... Kind regards, ...
    (php.general)