<?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"
	>
<channel>
	<title>Comments on: How to use Session Cookies in PHP</title>
	<atom:link href="http://www.scriptygoddess.com/archives/2007/05/28/how-to-use-session-cookies-in-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com/archives/2007/05/28/how-to-use-session-cookies-in-php/</link>
	<description></description>
	<pubDate>Thu, 28 Aug 2008 14:36:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Mark</title>
		<link>http://www.scriptygoddess.com/archives/2007/05/28/how-to-use-session-cookies-in-php/#comment-548809</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Tue, 12 Feb 2008 13:17:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/05/28/how-to-use-session-cookies-in-php/#comment-548809</guid>
		<description>Will, I was having the same trouble as you, I guess you used Keith's faster version as well.  The problem with his method is that when you load the post data directly like that, you overwrite all the existing data.

If you use the original foreach method, you only overwrite duplicate field names, which is perfect for multipage forms.</description>
		<content:encoded><![CDATA[<p>Will, I was having the same trouble as you, I guess you used Keith&#8217;s faster version as well.  The problem with his method is that when you load the post data directly like that, you overwrite all the existing data.</p>
<p>If you use the original foreach method, you only overwrite duplicate field names, which is perfect for multipage forms.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2007/05/28/how-to-use-session-cookies-in-php/#comment-521841</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Mon, 16 Jul 2007 04:02:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/05/28/how-to-use-session-cookies-in-php/#comment-521841</guid>
		<description>Radio buttons in a series will have the same name - but the one checked will be the one that defines the value... so in your case, you have two radio buttons set as
&lt;code&gt;name="contact"&lt;/code&gt;
So after you do the trick to transfer all the POST to SESSION - you can check for values, etc. using:
&lt;code&gt;$_SESSION['post']['contact']&lt;/code&gt;
For example:
&lt;code&gt; if ($_SESSION['post']['contact'] == "whateverTheDefaultValueIs") {
.....etc....&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Radio buttons in a series will have the same name - but the one checked will be the one that defines the value&#8230; so in your case, you have two radio buttons set as<br />
<code>name="contact"</code><br />
So after you do the trick to transfer all the POST to SESSION - you can check for values, etc. using:<br />
<code>$_SESSION['post']['contact']</code><br />
For example:<br />
<code> if ($_SESSION['post']['contact'] == &#8220;whateverTheDefaultValueIs&#8221;) {<br />
&#8230;..etc&#8230;.</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David</title>
		<link>http://www.scriptygoddess.com/archives/2007/05/28/how-to-use-session-cookies-in-php/#comment-521803</link>
		<dc:creator>David</dc:creator>
		<pubDate>Sun, 15 Jul 2007 20:17:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/05/28/how-to-use-session-cookies-in-php/#comment-521803</guid>
		<description>This was very helpful.  But what about radio buttons, where you have a default checked value?  I'd like to have the form remember if they're using the checked value, or whether they selected another value.  (You can see my form at http://www.meganhollingshead.com/contact.php.

Thanks.</description>
		<content:encoded><![CDATA[<p>This was very helpful.  But what about radio buttons, where you have a default checked value?  I&#8217;d like to have the form remember if they&#8217;re using the checked value, or whether they selected another value.  (You can see my form at <a href="http://www.meganhollingshead.com/contact.php" rel="nofollow">http://www.meganhollingshead.com/contact.php</a>.</p>
<p>Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: will</title>
		<link>http://www.scriptygoddess.com/archives/2007/05/28/how-to-use-session-cookies-in-php/#comment-521308</link>
		<dc:creator>will</dc:creator>
		<pubDate>Tue, 10 Jul 2007 12:51:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/05/28/how-to-use-session-cookies-in-php/#comment-521308</guid>
		<description>Your method saves me a lot of time, as I am trying to convert a 600+ field form into a step-by-step process using PHP sessions.  How do you apply this to a multi-page form (like, 5 pages, for example)?  I can't get a form on the second page to append data to the session, then repeat that process for each step of the form.</description>
		<content:encoded><![CDATA[<p>Your method saves me a lot of time, as I am trying to convert a 600+ field form into a step-by-step process using PHP sessions.  How do you apply this to a multi-page form (like, 5 pages, for example)?  I can&#8217;t get a form on the second page to append data to the session, then repeat that process for each step of the form.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith</title>
		<link>http://www.scriptygoddess.com/archives/2007/05/28/how-to-use-session-cookies-in-php/#comment-519490</link>
		<dc:creator>Keith</dc:creator>
		<pubDate>Thu, 21 Jun 2007 15:25:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/05/28/how-to-use-session-cookies-in-php/#comment-519490</guid>
		<description>There is a quicker way to transfer the $_POST info into $_SESSION

These are both just arrays .. so

Instead of:

&lt;code&gt;foreach($_POST as $k=&#62;$v) {
$_SESSION['post'][$k]=$v;
}&lt;/code&gt;


You could use:

&lt;code&gt;$_SESSION['post'] = $_POST;&lt;/code&gt;

Its less code, and not as processor intensive.</description>
		<content:encoded><![CDATA[<p>There is a quicker way to transfer the $_POST info into $_SESSION</p>
<p>These are both just arrays .. so</p>
<p>Instead of:</p>
<p><code>foreach($_POST as $k=&gt;$v) {<br />
$_SESSION['post'][$k]=$v;<br />
}</code></p>
<p>You could use:</p>
<p><code>$_SESSION['post'] = $_POST;</code></p>
<p>Its less code, and not as processor intensive.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.287 seconds -->
