Jan 21, 2005 #1 storm197 MIS Oct 9, 2002 55 CA Hi, In a page, i'm using an array variable with multiple values. Is there a way to transfert the entire variable values to another page without using a Form tag? Can I put arrays in a session variable ? Thank you.
Hi, In a page, i'm using an array variable with multiple values. Is there a way to transfert the entire variable values to another page without using a Form tag? Can I put arrays in a session variable ? Thank you.
Jan 21, 2005 #2 kenrbnsn Technical User Jun 7, 2002 606 US You can put anything you want into a session variable. You can also serialize the array and put it on the URL (if it isn't too big). Or you can serialize the array and store it in a file (which is what sessions do for you) or store it in a MySQL database table. Session are the way to go for what you want to do. Ken Upvote 0 Downvote
You can put anything you want into a session variable. You can also serialize the array and put it on the URL (if it isn't too big). Or you can serialize the array and store it in a file (which is what sessions do for you) or store it in a MySQL database table. Session are the way to go for what you want to do. Ken
Jan 21, 2005 Thread starter #3 storm197 MIS Oct 9, 2002 55 CA Ok, don't want to be too much dummie, but can you just show me a very short example on how you put arrays in session variables ? Upvote 0 Downvote
Ok, don't want to be too much dummie, but can you just show me a very short example on how you put arrays in session variables ?
Jan 21, 2005 #4 kenrbnsn Technical User Jun 7, 2002 606 US In your first program: Code: <? session_start(); $arr1 = array{'one','two','three'); $_SESSION['arr1'] = $arr1; ?> In your second program: Code: <? session_start(); $arr1 = $_SESSION['arr1']; ?> Ken Upvote 0 Downvote
In your first program: Code: <? session_start(); $arr1 = array{'one','two','three'); $_SESSION['arr1'] = $arr1; ?> In your second program: Code: <? session_start(); $arr1 = $_SESSION['arr1']; ?> Ken