Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IE with Windows XP not accepting cookies

Status
Not open for further replies.

john99999

Instructor
Apr 29, 2005
73
US
I made php script that writes a cookie and then reads it, using the setcookie php function.

This works fine on XP with Netscape, mac with IE, and mac with Safari, it does not work with XP and IE.

How do I get my cookie to work?
 
Thanks for the quick response:
The code is:
if(setcookie("roi_campaign",$campaign_id,$ttl))
echo "<SCRIPT>alert('Cookie Set OK');</SCRIPT>";
else
echo "<SCRIPT>alert('set cookie failed');</SCRIPT>";

echo "<SCRIPT>alert('$cookie_lifetime $ttl $visitors_uni');</SCRIPT>";

'set cookie failed' does NOT apprear, however there is not file created for my domain in my C:\Documents and Settings\john\Cookies diretory.

Why wont it create that file? I have even set my IE privacy option to accept all cookies.
 
Also, there are cookies for other sites in my
C:\Documents and Settings\john\Cookies directory
 
This, alert('$cookie_lifetime $ttl $visitors_uni'); alerts:
0 0 1

The rest of the code is:
$cookie_lifetime = intval(@implode(NULL, @mysql_fetch_row(@mysql_query("SELECT cookie_lifetime FROM roi_owners WHERE id=".$owner_id.";"))));
$ttl = ($cookie_lifetime == 0) ? 0 : time()+$cookie_lifetime;
$visitors_uni = 1;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top