Hi, thank you for your attention This is only a sample to understand how the session work, in order to use them in a more complex web applications The goal is verify how to pass the var $count through each of the three pages by the php session function
Particularly, when as usually, a client has the session/cookies disabled Call First.php $count=1 Go to the Second.php, here $count would be always = 1 (but with session disabled $count stay not defined) Go to the Third.php ==>> always $count=1 (but with session disabled $count stay not defined) Go to the First.php $count=2 (with session disabled $count is always =1) and go on.... 1) Ok is a writing mistake 2) I delete the hidden variable 'count' in the form, but the pb is not solved yet 3) The final php script has more fork I had to use header("Location...) 4) Yes!!! Is only a sample :-) 5) Deleted the hidden var Why with session enabled all is OK and with session disabled all is KO??? Bye bye Alessandro Steve Cayford wrote: > Don't know offhand what the problem is, but a couple thoughts: > > 1. Why are you using session_name(mysession) instead of > session_name('mysession')? > > 2. Assuming you have register_globals on, you're trying to pass $count > both as a session variable and a post variable. One of these is going to > get overwritten by the other if I'm not mistaken. > > 3. Why not have the page 1 form action point directly at page 2 instead > of being redirected through page 1? Do posted variables follow a > redirect? > > 4. If posted variables do follow a redirect then page 1 will see that > $submit is set and redirect to page 2, which will redirect to page 3, > which will redirect to page 1, etc... Can you get an infinite > redirection loop? > > 5. The form on page 1 includes a hidden count variable, page 2 and page > 3 don't. > > What happens when you run this? > > -Steve > > On Friday, November 2, 2001, at 08:49 AM, Alessandro BOSSI wrote: > -- 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]