SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Guru rashidr's Avatar
    Join Date
    Jun 2004
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to print all variables in Session

    How to print all variables in Session

  2. #2
    SitePoint Wizard
    Join Date
    Nov 2005
    Posts
    1,191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    print_r($_SESSION);

  3. #3
    SitePoint Guru rashidr's Avatar
    Join Date
    Jun 2004
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Following is the result of printing variables in session.

    Code:
    GEBRUIKER_INFO = O:9:"gebruiker":44:{s:4:"p_id";s:1:"7";s:5:"email";s:13:"test@test.com";s:12:"profile_name";s:7:"test123";s:8:"wagwoord";s:4:"test";s:6:"gender";s:1:"M";s:5:"dob_d";s:2:"19";s:5:"dob_m";s:1:"1";s:5:"dob_y";s:4:"1973";s:7:"country";s:3:"193";s:4:"city";s:0:"";s:12:"accepted_t_c";s:1:"1";s:6:"height";s:1:"0";s:6:"weight";s:1:"0";s:9:"eye_color";s:1:"0";s:10:"hair_color";s:1:"0";s:8:"drinking";s:1:"0";s:7:"smoking";s:1:"0";s:9:"body_type";s:1:"0";s:8:"sex_pref";s:1:"0";s:7:"website";s:0:"";s:10:"self_descr";s:0:"";s:17:"perf_match_gender";s:0:"";s:14:"perf_match_age";s:1:"0";s:13:"who_like_meet";s:0:"";s:5:"pic_1";s:26:"prfl/foto/7/pic_1_logo.jpg";s:5:"pic_2";s:0:"";s:5:"pic_3";s:0:"";s:5:"pic_4";s:0:"";s:6:"main_p";s:1:"1";s:5:"video";s:0:"";s:10:"dt_ingesit";s:19:"2009-10-27 02:18:31";s:6:"aktief";s:1:"1";s:10:"last_login";s:10:"2009-11-27";s:8:"kortinfo";s:3:"...";s:8:"prentpad";s:17:"images/no_pic.jpg";s:8:"ouderdom";i:36;s:11:"gender_word";s:4:"Male";s:7:"fav_lys";N;s:9:"fav_count";i:0;s:12:"laaste_aksie";s:19:"2009-11-27 18:14:41";s:14:"aktiveer_datum";N;s:16:"�gebruiker�today";s:10:"2009-11-27";s:25:"�gebruiker�today_and_time";s:19:"2009-11-27 18:20:48";s:12:"laaste_login";s:10:"2009-11-27";}
    I want to update highlited data with null value "". Can anyone help me.

  4. #4
    SitePoint Addict
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This looks like a serialized object stored in the session; one thing to make sure of is that none of the info in it is security sensitive data.

    In order to change anything in it you'll have to change the object value first and then set the same session variable, GEBRUIKER_INFO, to the revised serialized version of the object.

    btw: null and empty string "" are two different values.

  5. #5
    SitePoint Guru rashidr's Avatar
    Join Date
    Jun 2004
    Posts
    643
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thnx

    Quote Originally Posted by danNL View Post
    This looks like a serialized object stored in the session; one thing to make sure of is that none of the info in it is security sensitive data.

    In order to change anything in it you'll have to change the object value first and then set the session variable to the serialized version of the object again.

    btw: null and empty string "" are two different values.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •