By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,276 Members | 1,227 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,276 IT Pros & Developers. It's quick & easy.

Cookie's In Internet Explorer

P: n/a
Need help..

I am creating cookies in php, which works fine in Mozilla in the same
session[window], for example I can create them and then go to another
page and then come back to the page and see the results of the cookie
take effect. But in Internet Explorer I create the cookies, but have
to close the browser window/session and reopen the browser for the
cookies to be read/take effect.

Here is my code.

if ((isset($_POST['cookieCollege'])) &&
(isset($_POST['cookieFolder']))) {
setcookie("default_college", "$cookieCollege", time()+60*60*24*360,
"/", ".mycollegepost.com");
setcookie("default_folder", "$cookieFolder", time()+60*60*24*360,
"/", ".mycollegepost.com"); }

Then I have:

if(($_COOKIE['default_college']) && ($_COOKIE['default_folder']))
{
$collegeName = $_COOKIE[default_college];
$folder = $_COOKIE[default_folder];
echo "<meta HTTP-EQUIV=\"refresh\" CONTENT=\"0;
URL=http://www.mycollegepost.com/{$folder}/\">";
}

Thanks for any help!
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
If it works in Mozilla, then it's probably an Internet Explorer setting
gone wrong. I've noticed that the later versions of IE block cookies
from third-party sites by default (which is a good thing from a privacy
point of view). If your page is on a domain that's not the same as in
the address bar, then that could be the problem.
Look for a red exclamation mark on the bottom right of IE to see if
that's the case. If it's there then double-click it to open up the
cookie settings.


Justin wrote:
Need help..

I am creating cookies in php, which works fine in Mozilla in the same
session[window], for example I can create them and then go to another
page and then come back to the page and see the results of the cookie
take effect. But in Internet Explorer I create the cookies, but have
to close the browser window/session and reopen the browser for the
cookies to be read/take effect.

Here is my code.

if ((isset($_POST['cookieCollege'])) &&
(isset($_POST['cookieFolder']))) {
setcookie("default_college", "$cookieCollege", time()+60*60*24*360,
"/", ".mycollegepost.com");
setcookie("default_folder", "$cookieFolder", time()+60*60*24*360,
"/", ".mycollegepost.com"); }

Then I have:

if(($_COOKIE['default_college']) && ($_COOKIE['default_folder']))
{
$collegeName = $_COOKIE[default_college];
$folder = $_COOKIE[default_folder];
echo "<meta HTTP-EQUIV=\"refresh\" CONTENT=\"0;
URL=http://www.mycollegepost.com/{$folder}/\">";
}

Thanks for any help!

Jul 17 '05 #2

P: n/a
neur0maniak <us****@neur0maniak.co.uk> wrote in
news:41**********************@ptn-nntp-reader02.plus.net:

If it works in Mozilla, then it's probably an Internet Explorer
setting
gone wrong. I've noticed that the later versions of IE block cookies
from third-party sites by default (which is a good thing from a
privacy point of view). If your page is on a domain that's not the
same as in the address bar, then that could be the problem.
Look for a red exclamation mark on the bottom right of IE to see
if
that's the case. If it's there then double-click it to open up the
cookie settings.


Also I if Im not mistaken cookies only take effect after a new page is
loaded, or the current one reloaded (I think). I dont know if its IE only
or not. Its on the documentation page on cookies I believe.
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.