<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=PHP-and-MySQL%2FC4%2FCookies-Part-2%2FEnglish</id>
		<title>PHP-and-MySQL/C4/Cookies-Part-2/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=PHP-and-MySQL%2FC4%2FCookies-Part-2%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Cookies-Part-2/English&amp;action=history"/>
		<updated>2026-05-15T14:37:34Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Cookies-Part-2/English&amp;diff=874&amp;oldid=prev</id>
		<title>Pravin1389: moved PHP-and-MySQL/C4/Cookies-(Part 2)/English to PHP-and-MySQL/C4/Cookies-Part-2/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Cookies-Part-2/English&amp;diff=874&amp;oldid=prev"/>
				<updated>2012-12-01T15:09:22Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/index.php/PHP-and-MySQL/C4/Cookies-(Part_2)/English&quot; class=&quot;mw-redirect&quot; title=&quot;PHP-and-MySQL/C4/Cookies-(Part 2)/English&quot;&gt;PHP-and-MySQL/C4/Cookies-(Part 2)/English&lt;/a&gt; to &lt;a href=&quot;/index.php/PHP-and-MySQL/C4/Cookies-Part-2/English&quot; title=&quot;PHP-and-MySQL/C4/Cookies-Part-2/English&quot;&gt;PHP-and-MySQL/C4/Cookies-Part-2/English&lt;/a&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:09, 1 December 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Cookies-Part-2/English&amp;diff=571&amp;oldid=prev</id>
		<title>Chandrika: Created page with '{|Border=1 !Time !Narration |- |0:00 |Welcome back.  Just to summarise - in the first part of the cookie tutorial, we learnt how to create cookies, how to  give an expiry date to…'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Cookies-Part-2/English&amp;diff=571&amp;oldid=prev"/>
				<updated>2012-11-29T06:54:38Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;{|Border=1 !Time !Narration |- |0:00 |Welcome back.  Just to summarise - in the first part of the cookie tutorial, we learnt how to create cookies, how to  give an expiry date to…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{|Border=1&lt;br /&gt;
!Time&lt;br /&gt;
!Narration&lt;br /&gt;
|-&lt;br /&gt;
|0:00&lt;br /&gt;
|Welcome back.  Just to summarise - in the first part of the cookie tutorial, we learnt how to create cookies, how to  give an expiry date to the cookie and how to print out specific cookies.&lt;br /&gt;
|-&lt;br /&gt;
|0:13&lt;br /&gt;
|Using this command here, we also learnt how to print out  every cookie that we had stored.&lt;br /&gt;
|-&lt;br /&gt;
|0:18&lt;br /&gt;
|So assuming that we have created these cookies, the next thing I'll do is use this specific cookie here that I have created, to check whether it does exist or not.&lt;br /&gt;
|-&lt;br /&gt;
|0:28&lt;br /&gt;
|To do so, we will use a function called “isset”. &lt;br /&gt;
|-&lt;br /&gt;
|0:32&lt;br /&gt;
|This basically returns a true or false value depending on whether something is set or not.&lt;br /&gt;
|-&lt;br /&gt;
|0:37&lt;br /&gt;
|For example-  a cookie ,I'll put a dollar sign then underscore cookie. &lt;br /&gt;
|-&lt;br /&gt;
|0:42&lt;br /&gt;
|And I'll put 'name' in here.  &lt;br /&gt;
|-&lt;br /&gt;
|0:46&lt;br /&gt;
|So if I read this out in English language then I'll say -&lt;br /&gt;
|-&lt;br /&gt;
|0:49&lt;br /&gt;
|If the cookie name is set then we say echo “Cookie is set”. &lt;br /&gt;
|-&lt;br /&gt;
|0:57&lt;br /&gt;
|Otherwise we will echo out to the user that &amp;quot;Cookie is not set&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|1:01&lt;br /&gt;
|Assuming that I have set my cookie and everything is working, when I refresh this I'll get the message that the &amp;quot;Cookie is set&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|1:11&lt;br /&gt;
|Now I'll teach you how to 'unset' a cookie. &lt;br /&gt;
|-&lt;br /&gt;
|1:14&lt;br /&gt;
|So lets say over here - just before our 'if' statement, I wish to unset my cookie. &lt;br /&gt;
|-&lt;br /&gt;
|1:20&lt;br /&gt;
|So unset a cookie.&lt;br /&gt;
|-&lt;br /&gt;
|1:21&lt;br /&gt;
|So just to name one, I'll unset this cookie,&lt;br /&gt;
|-&lt;br /&gt;
|1:25&lt;br /&gt;
|presuming that if you learn to unset this one you can unset this one too.&lt;br /&gt;
|-&lt;br /&gt;
|1:31&lt;br /&gt;
|So I'll unset this name cookie. &lt;br /&gt;
|-&lt;br /&gt;
|1:34&lt;br /&gt;
|So to unset we use the same command and that’s  'setcookie'.&lt;br /&gt;
|-&lt;br /&gt;
|1:39&lt;br /&gt;
|So we are resetting a cookie. &lt;br /&gt;
|-&lt;br /&gt;
|1:41&lt;br /&gt;
|This doesn’t seem to make any sense but it will soon. &lt;br /&gt;
|-&lt;br /&gt;
|1:45&lt;br /&gt;
|Now we will set the cookie name to nothing.&lt;br /&gt;
|-&lt;br /&gt;
|1:49&lt;br /&gt;
|And our expiry date here...&lt;br /&gt;
|-&lt;br /&gt;
|1:51&lt;br /&gt;
|I'll create a new one with &amp;quot;exp unset&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|1:55&lt;br /&gt;
|And that is gonna equal to the time minus 86400.&lt;br /&gt;
|-&lt;br /&gt;
|2:01&lt;br /&gt;
|Here we said plus which meant that the time is in the future.&lt;br /&gt;
|-&lt;br /&gt;
|2:05&lt;br /&gt;
|Now by setting the cookie to this variable which represents a time in the future, we are actually unsetting the cookie.&lt;br /&gt;
|-&lt;br /&gt;
|2:13&lt;br /&gt;
|So if I were to say - set a cookie that already exists called name, to 'no value' at all. &lt;br /&gt;
|-&lt;br /&gt;
|2:20&lt;br /&gt;
|And use “exp unset” variable to set it to a time in the future, thereby 'unsetting' our cookie. &lt;br /&gt;
|-&lt;br /&gt;
|2:28&lt;br /&gt;
|So I'll get rid of this code for now and run this page, okay?&lt;br /&gt;
|-&lt;br /&gt;
|2:34&lt;br /&gt;
|Nothing has happened presuming my cookie is unset.  &lt;br /&gt;
|-&lt;br /&gt;
|2:40&lt;br /&gt;
|Now I want to get rid of this code - so I'll comment this out. &lt;br /&gt;
|-&lt;br /&gt;
|2:45&lt;br /&gt;
|And I'll put my 'if' statement back into my page.&lt;br /&gt;
|-&lt;br /&gt;
|2:48&lt;br /&gt;
|Now presuming this says - is the cookie set name? I'm going to unset the cookie which should get the result &amp;quot;Cookie is not set&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|2:56&lt;br /&gt;
|Lets refresh and we got &amp;quot;Cookie is not set&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|3:02&lt;br /&gt;
|And then from here you can set it again if you like and you can change the values of the cookie.&lt;br /&gt;
|-&lt;br /&gt;
|3:08&lt;br /&gt;
|To change the value of a cookie, you'll have to use 'setcookie' command again.&lt;br /&gt;
|-&lt;br /&gt;
|3:13&lt;br /&gt;
|You’ll say -  set cookie name and here just type a new value &lt;br /&gt;
|-&lt;br /&gt;
|3:17&lt;br /&gt;
|So its not hard to work with cookies.&lt;br /&gt;
|-&lt;br /&gt;
|3:19&lt;br /&gt;
|Its quiet an easy process.&lt;br /&gt;
|-&lt;br /&gt;
|3:21&lt;br /&gt;
|And it’s a very very useful thing in php  &lt;br /&gt;
|-&lt;br /&gt;
|3:23&lt;br /&gt;
|So use it to your heart’s content.  Okay. Thanks for watching.&lt;br /&gt;
|-&lt;br /&gt;
|3:27&lt;br /&gt;
|If you have any questions, please let me know. &lt;br /&gt;
|-&lt;br /&gt;
|3:30&lt;br /&gt;
|This is Evan Varkey dubbing for the Spoken Tutorial Project.  Bye.&lt;/div&gt;</summary>
		<author><name>Chandrika</name></author>	</entry>

	</feed>