<?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>PHP Tutorials Code Snippets and Php Tips &#187; new php cookie</title>
	<atom:link href="http://readytousesolutions.com/phpblog/tag/new-php-cookie/feed/" rel="self" type="application/rss+xml" />
	<link>http://readytousesolutions.com/phpblog</link>
	<description>PHP tutorials - Examples of the most useful scripts</description>
	<lastBuildDate>Thu, 23 Sep 2010 06:54:31 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>PHP Tutorial : Cookies and sessions</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-cookies-and-sessions/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-cookies-and-sessions/#comments</comments>
		<pubDate>Fri, 16 Jan 2009 16:32:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basic PHP]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[create cookie]]></category>
		<category><![CDATA[create php cookies]]></category>
		<category><![CDATA[create php sessions]]></category>
		<category><![CDATA[create session]]></category>
		<category><![CDATA[new cookie]]></category>
		<category><![CDATA[new php cookie]]></category>
		<category><![CDATA[new php session]]></category>
		<category><![CDATA[new session]]></category>
		<category><![CDATA[php cookies]]></category>
		<category><![CDATA[php sessions]]></category>
		<category><![CDATA[sessions]]></category>
		<category><![CDATA[set cookies]]></category>
		<category><![CDATA[set php cookie]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=91</guid>
		<description><![CDATA[Hi, Difference between php sessions and cookies is very simple : sessions will die after you will close the browser, but, cookies can be stored and reminded even after 1000 years, with the exception that user to not delete it &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-cookies-and-sessions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi,<br />
Difference between php sessions and cookies is very simple : sessions will die after you will close the browser, but, cookies can be stored and reminded even after 1000 years, with the exception that user to not delete it manually from his browser tools and options.<br />
Err, sessions and cookies are used in php to store informations, like variables but a little bit different.<br />
With a session you pass something like if an user is logged into his account, etc. With a cookie you could store the username and password, etc.</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
<span class="phpComment">//set a<span class="phpKeyword"> new </span>php session
</span><span class="phpScriptVar">$_SESSION</span><span class="phpOperator">[</span><span class="phpString">'loggedin'</span><span class="phpOperator">]</span> <span class="phpOperator">=</span> <span class="phpString">"no"</span><span class="phpText">;</span>
<span class="phpComment">//or
</span><span class="phpScriptVar">$_SESSION</span><span class="phpOperator">[</span><span class="phpString">'loggedin'</span><span class="phpOperator">]</span> <span class="phpOperator">=</span> <span class="phpString">"yes"</span><span class="phpText">;</span>
<span class="phpComment">//here you set a cookie
</span><span class="phpFunction">setcookie</span><span class="phpOperator">(</span><span class="phpString">"username"</span>, <span class="phpString">"someuser"</span>, <span class="phpString">"<span class="phpFunction">time</span><span class="phpOperator">(</span><span class="phpOperator">)</span><span class="phpOperator">+</span>72400"</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpComment">//and <span class="phpFunction">print</span> the cookie
</span><span class="phpFunction">print</span> <span class="phpScriptVar">$_COOKIE</span><span class="phpOperator">[</span><span class="phpString">'username'</span><span class="phpOperator">]</span><span class="phpText">;</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
]]></content:encoded>
			<wfw:commentRss>http://readytousesolutions.com/phpblog/php-tutorial-cookies-and-sessions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

