Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Apr 2012
    Posts
    151
    Plugin Contributions
    0

    Default I want to add 2 var in $_SESSION

    I want to add two vars
    $_SESSION['back_url'] and $_SESSION['current_url'];
    $_SESSION['back_url'] is for storing the history back page
    $_SESSION['current_url'] is for $_SERVER['REQUEST_URL']

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: how to add 2 var in $_SESSION

    Quote Originally Posted by linjuming View Post
    I want to add two vars
    $_SESSION['back_url'] and $_SESSION['current_url'];
    Easier than you think.

    $_SESSION['back_url'] = "enter your back URL here" ;
    $_SESSION['current_url'] = "enter your current URL here" ;

    Reading them back is as simple as

    $back_url = $_SESSION['back_url'] ;
    $current_url = $_SESSION['current_url'];

    Having said that though, I suspect that just knowing this isn't going to take care of what it is that you are actually wanting to do.

    What is the problem you are trying to solve?

    Cheers
    Rod

  3. #3
    Join Date
    Apr 2012
    Posts
    151
    Plugin Contributions
    0

    Default Re: how to add 2 var in $_SESSION

    no mater why I want to add two items in $_SESSION;
    can anyone tell me how to add them for no reasion?

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: how to add 2 var in $_SESSION

    Quote Originally Posted by linjuming View Post
    can anyone tell me how to add them for no reasion?
    I just did!

    Rod

 

 

Similar Threads

  1. Replies: 1
    Last Post: 14 Feb 2013, 09:37 PM
  2. I want to define myself grobal var,where to put it?
    By linjuming in forum General Questions
    Replies: 1
    Last Post: 7 Jul 2012, 02:52 PM
  3. v139h why add 2 $ in var
    By linjuming in forum General Questions
    Replies: 2
    Last Post: 21 Jun 2012, 01:44 PM
  4. What is the _GET[sort] var?
    By mgraphic in forum General Questions
    Replies: 2
    Last Post: 31 Aug 2006, 09:03 PM
  5. Session Var's outside store
    By w_lamoreaux in forum General Questions
    Replies: 6
    Last Post: 30 Aug 2006, 06:35 AM

Posting Permissions

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