Need help concerning php sessions.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • phpuser123
    New Member
    • Dec 2009
    • 108

    Need help concerning php sessions.

    I have as my script

    Code:
    <html>
    <body>
    <?php
    session_start();
    // store session data
    $_SESSION['views']=1;
    //retrieve session data
    echo "Pageviews=". $_SESSION['views'];
    ?>
    </body>
    </html>
    What i want is to start a session and store a variable bt when I am executing it ,I get an error like

    Warning: session_start() : Cannot send session cache limiter - headers already sent (output started at c:\program files\easyphp1-8\www\session.p hp:5) in c:\program files\easyphp1-8\www\session.p hp on line 6
    Pageviews=1

    What does the error mean?Any help will be kindly appreciated.Tha nks
    Last edited by Dormilich; Dec 2 '09, 11:17 AM. Reason: Please use [code] tags when posting code
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    check this Article (though not final it should provide you with some insight)

    Comment

    • phpuser123
      New Member
      • Dec 2009
      • 108

      #3
      RE:Need help on sessions

      Thanks,that was indeed of great help to me

      Comment

      Working...