|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[1999-05-11 08:01 UTC] sas at cvs dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 11 21:00:02 2026 UTC |
Hi! I?m not sure, but i think this could probably be a bug: I set a value of a cookie in JavaScript: <SCRIPT language="JavaScript"> COOKIELIVEDAYS=1; var COOKIE_DELDATE="Thu, 01-Jan-1970 00:00:00 GMT"; var COOKIE_INHALT = document.cookie.split(";"); function cookie_live() { var date=new Date(); date.setDate(date.getDate()+COOKIELIVEDAYS); var gmt=date.toGMTString(); var k1=gmt.indexOf(" "); var k2=gmt.indexOf(" ", k1+1); var k3=gmt.indexOf(" ", k2+1); var str=gmt.substring(0,k2)+"-"+gmt.substring(k2+1,k3)+"-"+gmt.substring(k3+ 3,gmt.length); return str; } function set_cookie(name, value) { document.cookie=name+"="+escape(value)+"; expires="+cookie_live(); } </SCRIPT> <? ..... echo "<SCRIPT language=\"JavaScript\"> cookie = \"1\"; \n set_cookie(\"DOUBEv\",cookie); \n </SCRIPT>"; ?> I checked the name and value of this cookie with another JavaScript-Function: The Cookie was available and its value was 1. When I checked the value in PHP3 with <? while (list($tmpvar, $tmpvalue)=each($HTTP_COOKIE_VARS)) { echo "$tmpvar : $tmpvalue <BR>\n"; } ?> 2 other cookies set before in PHP were available, but not the cookie set just before by the JavaScript-Function. Also the value of $DOUBEv in PHP3 was not available, an I think here could be a bug Gerhard.