<?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: Store all post variables/values in a session</title>
	<atom:link href="http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/</link>
	<description></description>
	<pubDate>Sun, 20 Jul 2008 13:54:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-568397</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Mon, 28 Apr 2008 15:19:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-568397</guid>
		<description>Not sure exactly what you mean but two things:

1) if you're processing a form that SESSION info - you don't need to have it in POST to be able to access it. As long as the page that's processing the form has session_start() - you have acces to that SESSION info and you can then put it in the mail() as needed.

2) if you need to have it in the POST for some reason (maybe you're processing the form on ANOTHER server - or another service is processing the form) - then when you're creating the form you can put the SESSION info into hidden input fields in the form and it will be sent along in the POST with the rest of the form...

Hope that makes sense. :)</description>
		<content:encoded><![CDATA[<p>Not sure exactly what you mean but two things:</p>
<p>1) if you&#8217;re processing a form that SESSION info - you don&#8217;t need to have it in POST to be able to access it. As long as the page that&#8217;s processing the form has session_start() - you have acces to that SESSION info and you can then put it in the mail() as needed.</p>
<p>2) if you need to have it in the POST for some reason (maybe you&#8217;re processing the form on ANOTHER server - or another service is processing the form) - then when you&#8217;re creating the form you can put the SESSION info into hidden input fields in the form and it will be sent along in the POST with the rest of the form&#8230;</p>
<p>Hope that makes sense. <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mihai</title>
		<link>http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-568356</link>
		<dc:creator>Mihai</dc:creator>
		<pubDate>Mon, 28 Apr 2008 07:17:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-568356</guid>
		<description>Can someone please tell me how can I post the $_SESSION variables so that I can use them in a mail( action. Sorry for my english !</description>
		<content:encoded><![CDATA[<p>Can someone please tell me how can I post the $_SESSION variables so that I can use them in a mail( action. Sorry for my english !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joshua</title>
		<link>http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-520299</link>
		<dc:creator>Joshua</dc:creator>
		<pubDate>Fri, 29 Jun 2007 13:50:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-520299</guid>
		<description>foreach($_POST as $k=&#62;$v) {
$_SESSION[$k]=$v;
}

That can also be a security risk, depending on how you wrote the rest of the app... such as if you store something like a userID as a sess, and someone posts in a fake form with userID=125, that will now set the sess variable and have them running around as user 125 from now on, with access to that account, or any other account they want to post in as.  If you do store key info in a sess that people could potentially guess (or bots post thousands of forms trying to hit something) you won't want to use that technique.</description>
		<content:encoded><![CDATA[<p>foreach($_POST as $k=&gt;$v) {<br />
$_SESSION[$k]=$v;<br />
}</p>
<p>That can also be a security risk, depending on how you wrote the rest of the app&#8230; such as if you store something like a userID as a sess, and someone posts in a fake form with userID=125, that will now set the sess variable and have them running around as user 125 from now on, with access to that account, or any other account they want to post in as.  If you do store key info in a sess that people could potentially guess (or bots post thousands of forms trying to hit something) you won&#8217;t want to use that technique.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scriptygoddess &#187; How to use Session Cookies in PHP</title>
		<link>http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-516531</link>
		<dc:creator>scriptygoddess &#187; How to use Session Cookies in PHP</dc:creator>
		<pubDate>Tue, 29 May 2007 04:03:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-516531</guid>
		<description>[...] To create the session cookies - very easy:&#60;?php foreach($_POST as $k=&#62;$v) { $_SESSION['post'][$k]=$v; } ?&#62; (I&#8217;ve actually mentioned this method before) [...]</description>
		<content:encoded><![CDATA[<p>[...] To create the session cookies - very easy:&lt;?php foreach($_POST as $k=&gt;$v) { $_SESSION['post'][$k]=$v; } ?&gt; (I&#8217;ve actually mentioned this method before) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jennifer</title>
		<link>http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-501666</link>
		<dc:creator>Jennifer</dc:creator>
		<pubDate>Thu, 01 Mar 2007 23:38:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-501666</guid>
		<description>var_dump($_SESSION) will NOT destroy the values or session... it will just display the values to the screen.

&lt;a href="http://us2.php.net/manual/en/function.var-dump.php" rel="nofollow"&gt;see function var_dump on the php manual&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>var_dump($_SESSION) will NOT destroy the values or session&#8230; it will just display the values to the screen.</p>
<p><a href="http://us2.php.net/manual/en/function.var-dump.php" rel="nofollow">see function var_dump on the php manual</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Craig Cerny</title>
		<link>http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-501501</link>
		<dc:creator>Craig Cerny</dc:creator>
		<pubDate>Wed, 28 Feb 2007 20:51:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-501501</guid>
		<description>If you would like to retrieve a previous post later in your web app, you can store the current post as follows:
$_SESSION['previous_post'] = $_POST;

Then when your ready to use the old post you can either completely overwrite the current post as follows:
$_POST = $_SESSION['previous_post'];

or access that info directly from the session (may have side effects) as follows:
echo $_SESSION['previous_post']['some_posted_variable'];</description>
		<content:encoded><![CDATA[<p>If you would like to retrieve a previous post later in your web app, you can store the current post as follows:<br />
$_SESSION['previous_post'] = $_POST;</p>
<p>Then when your ready to use the old post you can either completely overwrite the current post as follows:<br />
$_POST = $_SESSION['previous_post'];</p>
<p>or access that info directly from the session (may have side effects) as follows:<br />
echo $_SESSION['previous_post']['some_posted_variable'];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: matt</title>
		<link>http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-501395</link>
		<dc:creator>matt</dc:creator>
		<pubDate>Tue, 27 Feb 2007 21:22:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-501395</guid>
		<description>try var_dump($_SESSION);</description>
		<content:encoded><![CDATA[<p>try var_dump($_SESSION);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jen</title>
		<link>http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-498688</link>
		<dc:creator>Jen</dc:creator>
		<pubDate>Thu, 08 Feb 2007 19:39:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.scriptygoddess.com/archives/2007/02/07/store-all-post-variablesvalues-in-a-session/#comment-498688</guid>
		<description>oh my goodness, I didn't even know it was possible to just loop through the variables like that! Thanks for sharing... you just made my life about 1 million times easier :)</description>
		<content:encoded><![CDATA[<p>oh my goodness, I didn&#8217;t even know it was possible to just loop through the variables like that! Thanks for sharing&#8230; you just made my life about 1 million times easier <img src='http://www.scriptygoddess.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
</channel>
</rss>

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