note 45717 added to function.setcookie
| From: | angelo | Date: | Thu, 16 Sep 2004 00:45:18 +0000 |
| Subject: | note 45717 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-76805@lists.php.net to get a copy of this message | ||
Using IIS3/4/5 and cannot set cookies? Me too, and I cannot modify the IIS server. I came up with
this work around using JavaScript:
...
</title>
<script language="JavaScript">
function OnLoad()
{
<?php
if( $NewSessionID )
{
echo " document.cookie = \"PHPSESSID=$NewSessionID\";\n";
}
?>
}
</script>
</head>
<body onLoad="javascript: OnLoad()">
..
Dirty, yes! But does the job!
----
Manual Page -- http://www.php.net/manual/en/function.setcookie.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45717
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45717&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45717&report=yes
Search -- http://master.php.net/manage/user-notes.php