#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    58
    Rep Power
    15
    I'm having terrible problems with my session and post form heavy pages and I'm now experimenting with different ways of doing it.

    I removed the session_start() I had at the top of every page, so that session_register() will have to live without it.

    Nothing happens. It is exactly the same as before. What's the purpose of session_start()??

    ------------------

    peterbe.com
  2. #2
  3. No Profile Picture
    Apprentice Deity
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 1999
    Location
    Niagara Falls (On the wrong side of the gorge)
    Posts
    3,237
    Rep Power
    19
    session_register() will automatically start a session if session_start() hasn't been called. session_start() would be used if you need to access session variables but won't be registering any new variables or, more importantly, if the current page won't be accessing or registering any variables but session state needs to be maintained when linking to subsequent pages.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    Correct me if I am wrong (very new to PHP) but it would seem that yes indeed you must call session_start() to maintain the session and to access var's that were set prior to the current page. I some how missed this and couldn't figure out why I couldn't get a value from my session var's! Now I call session_start() on each page and all works well!

    Kevin


    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>Originally posted by rod k:
    session_register() will automatically start a session if session_start() hasn't been called. session_start() would be used if you need to access session variables but won't be registering any new variables or, more importantly, if the current page won't be accessing or registering any variables but session state needs to be maintained when linking to subsequent pages.[/quote]

Similar Threads

  1. Uploading Files
    By vivekjain in forum ASP Programming
    Replies: 0
    Last Post: February 16th, 2004, 11:21 PM
  2. database access using thread
    By padmini in forum Visual Basic Programming
    Replies: 3
    Last Post: February 6th, 2004, 12:38 AM
  3. Win32::API Help!!!
    By robbydooo in forum Perl Programming
    Replies: 5
    Last Post: February 2nd, 2004, 02:25 PM
  4. Header redirect function not working after host switch
    By Jhorra in forum PHP Development
    Replies: 5
    Last Post: January 26th, 2004, 10:28 AM
  5. How to get multiple sessions for one user working?
    By jkoerber in forum PHP Development
    Replies: 1
    Last Post: January 16th, 2004, 01:23 PM

IMN logo majestic logo threadwatch logo seochat tools logo