note 45717 deleted from function.setcookie by tomsommer
| From: | tomsommer@php.net | Date: | Thu, 16 Sep 2004 10:17:21 +0000 |
| Subject: | note 45717 deleted from function.setcookie by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76811@lists.php.net to get a copy of this message | ||
Note Submitter: angelo [at] mandato (dot) com
----
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!