Re: [PHP4BETA] cookie, post method form, cycling background

From: Date: Sat, 29 Apr 2000 08:09:47 +0000
Subject: Re: [PHP4BETA] cookie, post method form, cycling background
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-14162@lists.php.net to get a copy of this message
Hi, I think the problem is that you set the cookie _on the client's browser_ when the new page is loaded - however when you access cookies you access the data that is sent _from the client's browser_ to the server, and the new cookie is only sent to the browser the next time a page is requested from the server. A workaround would be to use another page for setting the cookie and then redirecting the user to the counter page. Regards Christian ----- Original Message ----- From: "Cynic" <cynic@mail.cz> To: <php4beta@lists.php.net> Sent: Saturday, April 29, 2000 3:21 AM Subject: [PHP4BETA] cookie, post method form, cycling background > This is my first attempt with cookies, I've run into a prob, > and unfortunatelly, it's 3 AM here. Just can't see it. > Apache / 4b RC2-dev on NT, MSIE5.0 & CC4.7 on NT > > goal: 5 backgrounds. User clicks the submit button, next > backbround is displayed, and its number is stored in a cookie. > 1 -> 2 -> 3 -> 4 -> 5 -> 1 -> 2 ... > > The prob: > > display the page, submit the form... nothing happens. (1) submit > again, get the next background... ok. go someplace else, then > back to the page (or reload the page), get the next background. > (2) submit the form, nothing happens, submit again, get the next > background. >

« previous php.version4 (#14162) next »