Cookie testing
Posted: Sat Jun 04, 2005 9:06 pm
Hi,
I'm writing a Poll script at the moment. When someone clicks on Vote, the forms uses POST to the same page. When the page loads it checks whether POST data exists and sets a "Voted" Cookie if it has. Then later in the same script a display class checks whether the Cookie has been set.
The problem is that it doesn't recognise that the cookie has been set until the page is refreshed again. Is there any way to set the Cookie AND check if it has been set in the same script?
I'm writing a Poll script at the moment. When someone clicks on Vote, the forms uses POST to the same page. When the page loads it checks whether POST data exists and sets a "Voted" Cookie if it has. Then later in the same script a display class checks whether the Cookie has been set.
The problem is that it doesn't recognise that the cookie has been set until the page is refreshed again. Is there any way to set the Cookie AND check if it has been set in the same script?