• Notice regarding image hosts and attachments. See here.

php refresh to set cookie

Associate
Joined
19 Jul 2006
Posts
1,847
My cookie shoping cart app is slowly getting there. but im having a problem with the cookies not been set untill the page is refreshed so the displayed basket is always 1 item behind.

im thinking of using
PHP:
<?
    
            header("location:" . $_SERVER['PHP_SELF']);
    
?>

But i only want this to do it once, just so the cookie is set properly.
 
Back
Top Bottom