denhamd2 Posted April 6, 2007 Share Posted April 6, 2007 Hi, In my first page I passed variables to my second page and I stored them as session variables of the same name in my 2nd page. However in my 3rd page I want to echo all the session variables I stored in the 2nd page. Any idea on how to do this? Here is my code in the 2nd page for storing the session variables... <?php // This will set all your get varibles to session with same name in get $un_nec_varible = array('monthsubmit','anyother'); if(isset($_GET)){ foreach($_GET as $key => $value){ if(!in_array($key,$un_nec_varible)){ $_SESSION["DATA"][$key] = $value; echo "<li>".$value."</li>"; } } } ?> Quote Link to comment Share on other sites More sharing options...
PC Nerd Posted April 6, 2007 Share Posted April 6, 2007 im, i dont know, but i know that you can use the function in my other thread http://www.phpfreaks.com/forums/index.php/topic,134786.0.html. tjhis only works on the same page i think..... good luck Quote Link to comment Share on other sites More sharing options...
trq Posted April 6, 2007 Share Posted April 6, 2007 <?php session_start(); foreach($_SESSION['DATA'] as $v) { echo "$v<br />"; } ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.