View Full Version : passing the array values stored in session through url
how can i pass the array values stored in the session through url to next page
kehers
10-18-2006, 01:31 PM
Try this:
echo "<a href=\"nextpage.php?".http_build_query($_SESSION['ur_array'])."\">Next page</a>";
By the way, why did u have to pass the array over url since u can alwasy call the session back from the page u want to pass it to...on ur next page for example, u could as well have done something like this:
session_start();
//.....
$myarray = $_SESSION['my_array'];
remember, all session variables are available on every page as long as u do ur session_start in the beginning of the page
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.