RE: [PHP] [Session]
| From: | Brian Drexler | Date: | Tue, 26 Mar 2002 19:24:53 +0000 |
| Subject: | RE: [PHP] [Session] | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-90253@lists.php.net to get a copy of this message | ||
Try using the same session variable. Right now it looks like the first one
is "v_s" and the second is "s_v". HTH.
Brian
-----Original Message-----
From: Evan [mailto:evan80@libero.it]
Sent: Tuesday, March 26, 2002 2:15 PM
To: php-general@lists.php.net
Subject: [PHP] [Session]
Hi !!
I can't make this work:
PAGE 1:
<?
$HTTP_SESSION_VARS["v_s"]=500;
?>
<html>
<head>
<title>SESSION 1</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Variabile settata? --
<?
if (isset($HTTP_SESSION_VARS["v_s"])){
echo "si";
}else{
echo "no";
}
?></p>
<p><a href="sess_2.php">link to next</a>
</p></body>
</html>
In page 1 I create the session var and I check if it exists. The if stat
returns YES so it seems everything's ok.
PAGE 2:
<html>
<head>
<title>SESSION 2</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?
echo $HTTP_SESSION_VARS["s_v"];
?>
</body>
</html>
In page 2 I simply read the session var but it doesn't return anything.
I must leave register_globals = Off !!!!!
What's wrong?
Thanks,
Evan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php