Forum Moderators: coopster
I use the following code to create session then store a session variable called query and then redirect to another page called insertaccount.php where i wish to use the
session value query. when i get to insertaccount.php the session variable query does not exist.can any one tell me why this is.
page1.php
<php?
session_start();
$_SESSION['query'] = $query;
header("Location: [127.0.0.1...]
?>
insertaccount.php
//inside
<?php
session_start();
$sql_query = $_SESSION['query'];
?>
If that doesn't work - are cookies enabled, allowing the propagation of the session ID? You might have some trouble with the way you are using 127.0.0.1 in the URL with cookies, too.