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

    Join Date
    May 2000
    Posts
    109
    Rep Power
    15
    If i store a session-varibale with the command

    >> session_register("var");
    >> $var = "test";

    how can i get the value of this variable??

    I tried

    >> session_encode("var");
    >> echo $var;

    but i doesn't work!!

    Thanx for every help!
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    23
    Rep Power
    0
    Using session variables :
    start_session() before calling the session_is_registered() or even session_register(). Also make sure your sesion_register() is called like setcookie(), as header. Funny but true, I assumed that the session_register needs to kick off a session but unless you session_start(), cannot not register any variable. Also, if you are checking for any registered variable on an another page, again use session_start() before checking the variable value. But the session_start() doesnt start another session, so you will be fine with the values.

    Mzzls Dave

Similar Threads

  1. losing session variables
    By shawazi in forum PHP Development
    Replies: 1
    Last Post: January 27th, 2004, 01:02 PM
  2. function to set session variables
    By clearbar in forum PHP Development
    Replies: 1
    Last Post: January 13th, 2004, 02:47 PM
  3. Questions about session variables, I think.
    By Stahler in forum PHP Development
    Replies: 2
    Last Post: December 29th, 2003, 09:04 AM
  4. Sending session variables?
    By seb835 in forum Mobile Programming
    Replies: 0
    Last Post: December 14th, 2003, 09:24 AM
  5. session variables in php
    By bussa_srik in forum PHP Development
    Replies: 1
    Last Post: October 12th, 2003, 02:00 PM

IMN logo majestic logo threadwatch logo seochat tools logo