other way around, set the variable the register it
session_start();
$hello = 'chris lee';
session_register('hello');
here is my session file.
<?php
include_once('time.egn');
if ( isset($PHPSESSID) )
session_id($PHPSESSID);
session_start();
if (!isset($HTTP_SESSION_VARS['SessionID']))
{
$SessionID = mtime();
session_register('SessionID');
}
$PHPSESSID = session_id();
$SID = "PHPSESSID=$PHPSESSID";
?>
--
Chris Lee
[EMAIL PROTECTED]
""Lic. Rodolfo Gonzalez Gonzalez"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hello list,
I just can't make sessions work. This is driving me mad, I'm sure it's
something silly, but maybe my headache made me a fool :P :) ... could you
please tell me what's wrong here?. hello.php has a link to next.php:
--- start of hello.php ---
<?php
session_start();
session_register("hello");
$hello = "Hello World!";
?>
<html>
<head><title></title></head>
<body>
<?php
print "<a href=\"next.php\">$hello</a>";
?>
</body>
</hmtl>
--- end of hello.php ---
-- start of next.php
<?php
// following the manual, I need to call session_start to resume the
// session I started at hello.php (?)
session_start();
?>
<html>
<head><title></title></head>
<body>
<?php
print "Hello is set to: $HTTP_SESSION_VARS[hello] - $hello";
?>
</body>
</html>
--- end of next.php ---
Now I click on the hyperlink and get a new cookie (produced by call to
session_start() in next.php). Using PHP4.0.4pl1 (with --enable-trans-id),
Apache, and the linux version of ns navigator as browser.
Thank you!,
Rodolfo.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]