Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
July 23, 2004, 9:16 pm
rate this thread
<? php session_start();
in the middle of Page2 I have a form varaible:
<?php echo $_POST['stateSelected']; ?>
<?php echo $_SESSION['s']; ?>
The form var displays the first time the page loads. The session var
displays only after reloading the page2.
Re: session var is setting ONLY AFTER I reload page, form var displays first page load
because that's how HTTP works... read and learn.
w3c is a good starting place, although i seem to remember that the
php.net documentation regarding cookies and/or sessions might give you
a good insight into this.
simple solution to your problem: call session_start() in Page1