<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Set/Get Cookie using PHP and JavaScript</title>
	<atom:link href="http://www.satya-weblog.com/2007/05/php-and-javascript-cookie.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.satya-weblog.com/2007/05/php-and-javascript-cookie.html</link>
	<description>a Developer&#039;s playground</description>
	<lastBuildDate>Sun, 14 Mar 2010 15:44:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Satya Prakash Karan</title>
		<link>http://www.satya-weblog.com/2007/05/php-and-javascript-cookie.html/comment-page-1#comment-146</link>
		<dc:creator>Satya Prakash Karan</dc:creator>
		<pubDate>Fri, 03 Oct 2008 19:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.satyakaran.com/2007/05/php-and-javascript-cookie.html#comment-146</guid>
		<description>yes, cookie will be accessed lately. it will be late by one step!</description>
		<content:encoded><![CDATA[<p>yes, cookie will be accessed lately. it will be late by one step!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Deaddancer</title>
		<link>http://www.satya-weblog.com/2007/05/php-and-javascript-cookie.html/comment-page-1#comment-145</link>
		<dc:creator>Deaddancer</dc:creator>
		<pubDate>Fri, 03 Oct 2008 18:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.satyakaran.com/2007/05/php-and-javascript-cookie.html#comment-145</guid>
		<description>I have been grappling with a way to get a variable from javascript to PHP and finally gave cookies a try. I have a confirm pop up in my js, and based on what they click (OK/Cancel) I either set a cookie (load_all_data=Y) or I delete it. Then back in my PHP I do a comparison operation;&lt;br/&gt;(if ($_COOKIE[&quot;load_all_data&quot;]==&#039;Y&#039;) &lt;br/&gt;&lt;br/&gt;and it ALMOST works perfectly. The issue seems to be that when I process this PHP code, the cookie value is always one step behind, as if PHP reads the value of the cookie before it&#039;s assigned. Does this make sense? Basically, my confirm message logic works flawlessly the 2nd time you click one of the options, but as soon as you change to the other option, it doesn&#039;t work until you do it once more, and vice versa when switching back (i.e. OK vs. Cancel)</description>
		<content:encoded><![CDATA[<p>I have been grappling with a way to get a variable from javascript to PHP and finally gave cookies a try. I have a confirm pop up in my js, and based on what they click (OK/Cancel) I either set a cookie (load_all_data=Y) or I delete it. Then back in my PHP I do a comparison operation;<br />(if ($_COOKIE["load_all_data"]==&#8217;Y') </p>
<p>and it ALMOST works perfectly. The issue seems to be that when I process this PHP code, the cookie value is always one step behind, as if PHP reads the value of the cookie before it&#8217;s assigned. Does this make sense? Basically, my confirm message logic works flawlessly the 2nd time you click one of the options, but as soon as you change to the other option, it doesn&#8217;t work until you do it once more, and vice versa when switching back (i.e. OK vs. Cancel)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satya Prakash Karan</title>
		<link>http://www.satya-weblog.com/2007/05/php-and-javascript-cookie.html/comment-page-1#comment-137</link>
		<dc:creator>Satya Prakash Karan</dc:creator>
		<pubDate>Fri, 23 May 2008 05:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.satyakaran.com/2007/05/php-and-javascript-cookie.html#comment-137</guid>
		<description>Are you setting the cookie correctly. Here in blogspot is a sub domain concept.</description>
		<content:encoded><![CDATA[<p>Are you setting the cookie correctly. Here in blogspot is a sub domain concept.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lahlah</title>
		<link>http://www.satya-weblog.com/2007/05/php-and-javascript-cookie.html/comment-page-1#comment-136</link>
		<dc:creator>lahlah</dc:creator>
		<pubDate>Thu, 22 May 2008 18:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.satyakaran.com/2007/05/php-and-javascript-cookie.html#comment-136</guid>
		<description>It doesn&#039;t work with me. :(&lt;br/&gt;All the javascript works fine, except for the set cookie part.&lt;br/&gt;When I check browser&#039;s cookies for my blogger blog only the Google Analytics cookies are saved.</description>
		<content:encoded><![CDATA[<p>It doesn&#8217;t work with me. <img src='http://blog.satya-weblog.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> <br />All the javascript works fine, except for the set cookie part.<br />When I check browser&#8217;s cookies for my blogger blog only the Google Analytics cookies are saved.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Satya Prakash Karan</title>
		<link>http://www.satya-weblog.com/2007/05/php-and-javascript-cookie.html/comment-page-1#comment-135</link>
		<dc:creator>Satya Prakash Karan</dc:creator>
		<pubDate>Thu, 22 May 2008 17:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.satyakaran.com/2007/05/php-and-javascript-cookie.html#comment-135</guid>
		<description>If it is possible to add your javascript code and javascript file then it should be possible doing that also. &lt;br/&gt;I never tried that.</description>
		<content:encoded><![CDATA[<p>If it is possible to add your javascript code and javascript file then it should be possible doing that also. <br />I never tried that.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 2/18 queries in 0.014 seconds using disk
Content Delivery Network via blog.satya-weblog.com

Served from: www.satya-weblog.com @ 2010-03-15 02:38:37 -->