Web Hosting Talk







View Full Version : Cookies problem


Powi
10-11-2004, 06:46 PM
I have this code that does set cookies using firefox, but i does not work with IE.


if ($_POST[username] == $query_data[username] && $_POST[pass] == $query_data[pass]) {
setcookie ("username", $_POST[username], $time+3200);
setcookie ("pass", md5($_POST[pass]), $time+3200);
}


PHP does enter the if condision but the cookies are not set.

Any ideas?

Thanks

Veghost
10-11-2004, 08:33 PM
I think you should show entire listing, for example how you verify if cookies are set.

luki
10-12-2004, 02:09 AM
Yes, you need to show more code... is $time defined? Or did you mean time()?

Powi
10-12-2004, 10:16 AM
Thanks for the replys

I now made this simple test file.


<?
setcookie ("cookietest", "Testing Cookie", time()+3200);
?>


This is all the code there is in the file. And it does it's job in Firefox but does not in IE. Any ideas?

The file is located at: http://kaoz-tutorials.com/affiliates/test.php


Thanks again.

thartdyke
10-12-2004, 10:36 AM
Works fine for me - I see a cookie in both Mozilla and IE. What are your privacy settings in IE?

Powi
10-12-2004, 12:07 PM
mmmmmm, I set privacy to the lowest, to accept ALL cookies and it is still not working. I'll try to test this form another computer.

Thanks