Posted by Maximus on 11/19/06 10:13
PAGE1.PHPis working fine ...
PAGE2.PHP doesn't echo any sessions.
Sessions at that page turn to NULL.
Jim Carlock wrote:
> "Maximus" <teddy.am@gmail.com> posted:
> : here's the code ...
>
> Try the following...
> <snip>
> PAGE1.PHP...
> <?php
>
> session_start();
>
> $_SESSION['1'] = $_POST['textfield'];
>
> echo("<html>\n<head>\n<title>Test</title>\n</head>\n<body>\n");
> echo("<p>$_SESSION['1']</p>\n");
>
> echo "<pre>\n";
> print_r($_SESSION);
> echo "</pre>\n";
>
> ?>
>
> <p> </p>
> <p><a href="page2.php">page 2</a> </p>
> </body></html>
> </snip>
>
> Where's the <!DOCTYPE ... >, <html>, <head> and <body>
> tags? And do you have your cookies turned on in your browser?
>
> --
> Jim Carlock
Navigation:
[Reply to this message]
|