Page 1 of 1

PHP-Problems trying to read a cookie in IE

Posted: Wed Dec 31, 2003 3:36 pm
by LegionPete
I'm tying to read a cookie in IE. The problem is, that I must manually refresh the page after the page has already been loaded once. I though maybe it was pulling from a cahced page, but when I clear my cache and my cookies, it still holds the old value until I click the refresh option.

http://www.joycemeyer.org/cgi-bin/msoft ... st&CARTID=

here is the link. Click on the text prefs just to see how it runs. When you try to access it a second time, after you've submited it once, It is suppose to look up the new cookie value, and start there. Instead, It will default to a previous number. Say, If it was 0 when you started, when you return, it will still be 0 until you refresh. Can you help?

Posted: Wed Dec 31, 2003 3:43 pm
by LegionPete
I guess the real question is, why isn't it reading my cookie read the first time?

Posted: Wed Dec 31, 2003 3:49 pm
by Straterra
Because..a page MUST refresh to read the cookies. This is because PHP is a server side language. What I would suggest is this line after writing the cookie.

Code: Select all

<meta http-equiv="REFRESH" content=".1;URL=http://eckclan.sytes.net">

Posted: Thu Jan 01, 2004 1:14 am
by JAM
Or use [php_man]header[/php_man]()'s to forward the users.

It works!

Posted: Thu Jan 01, 2004 1:15 pm
by LegionPete
Actually, it seems that the server was dealing out a cached page....not really sure why. Anyway, thanks for the help this has be solved.