note 46758 rejected from function.setcookie by betz
| From: | betz@php.net | Date: | Fri, 22 Oct 2004 10:11:55 +0000 |
| Subject: | note 46758 rejected from function.setcookie by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-78936@lists.php.net to get a copy of this message | ||
Note Submitter: justin at mycollegepost dot com
----
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 reload the page and see the results 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!