I'm having a difficult time understanding how to to get stored session variables to work. I am registering the session_variable using the following script.
<?php
if (!isset($stored_info)) {$ctored_info = array();};
session_register($stored_info);
GLOBAL $link_id;
$email='test@mindspring.com';
include "images/common_db.inc";
$link_id = db_connect($default_dbname);
$result=mysql_query("SELECT frstnm,lstnm FROM user WHERE email='$email'",$link_id);
IF (!($stored_info=mysql_fetch_array($result))) {
error_message("No such email address. You need to create a new account.");
};
header ("Location: http://show_register.php?<?=SID?>");
?>
And I am using these stored session variables in the following script on a different page:
#this file is: show_register.php
<?php
echo $stored_info[frstnm].' '.$stored_info[lstnm].' is registered for this session.<br>';
echo $stored_info[cstid].' is the cust ID '.$stored_info[pwrd].' is the password.';
?>
I cannot seem to display the variables. I'm not really sure if I am even registering the variables properly. Any help would be greatly appreciated.
thanks,
Bryan