Page 1 of 1

Proble with cookies.

Posted: Tue Nov 02, 2010 7:43 am
by alehawk
Hi!
I got problems managin cookies.
I got 2 php pages.

page 1

Code: Select all

$expire=time()+60*60*24*30;
echo setcookie("PSA_AC", "2", $expire);
When you click on a link it will go to a refresh

Code: Select all

<meta http-equiv="refresh" content="0;url=http://psadip/home/page2.php">
And the landign page, page 3

Code: Select all

<?php
print_r($_COOKIE);
echo $localremoto;
exit();
My problem is that I loose the cookie :S
If i print_r($_COOKIE) the only thing I get is the PHPSESSID but not my cookie.
If before redirecting, in the same HTML I print_r($_COOKIE); exit(); the cookie will be retrieved.
Any Ideas?
Tnx!