Silly sessions problem.

From: Date: Thu, 22 Mar 2001 23:55:36 +0000
Subject: Silly sessions problem.
Groups: php.general 
Request: Send a blank email to php-general+get-45213@lists.php.net to get a copy of this message
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.

« previous php.general (#45213) next »