<?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: A quick PHP function to get Post, Get, or Session variables; and Cookies too</title>
	<atom:link href="http://www.nutt.net/2004/12/27/a-quick-php-function-to-get-post-get-or-session-variables-and-cookies-too/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nutt.net/2004/12/27/a-quick-php-function-to-get-post-get-or-session-variables-and-cookies-too/</link>
	<description>Random articles on whatever I feel like...</description>
	<pubDate>Thu, 28 Aug 2008 04:59:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
		<item>
		<title>By: Ryan</title>
		<link>http://www.nutt.net/2004/12/27/a-quick-php-function-to-get-post-get-or-session-variables-and-cookies-too/#comment-31585</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Tue, 17 Jun 2008 02:24:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/27/a-quick-php-function-to-get-post-get-or-session-variables-and-cookies-too/52.html#comment-31585</guid>
		<description>That's right, of course, and now that I see it written out it's pretty obvious.</description>
		<content:encoded><![CDATA[<p>That&#8217;s right, of course, and now that I see it written out it&#8217;s pretty obvious.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.nutt.net/2004/12/27/a-quick-php-function-to-get-post-get-or-session-variables-and-cookies-too/#comment-31582</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Tue, 17 Jun 2008 00:34:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/27/a-quick-php-function-to-get-post-get-or-session-variables-and-cookies-too/52.html#comment-31582</guid>
		<description>The diagnostic will be "Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in" followed by the file and line in which the call is attempted.  So you want "else if (session_id() != “”) { if (array_key_exists($sVarName, $_SESSION) == TRUE) $temp = $_SESSION[$sVarName]; }" in place of the simpler code.</description>
		<content:encoded><![CDATA[<p>The diagnostic will be &#8220;Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in&#8221; followed by the file and line in which the call is attempted.  So you want &#8220;else if (session_id() != “”) { if (array_key_exists($sVarName, $_SESSION) == TRUE) $temp = $_SESSION[$sVarName]; }&#8221; in place of the simpler code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.nutt.net/2004/12/27/a-quick-php-function-to-get-post-get-or-session-variables-and-cookies-too/#comment-31575</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Mon, 16 Jun 2008 18:49:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/27/a-quick-php-function-to-get-post-get-or-session-variables-and-cookies-too/52.html#comment-31575</guid>
		<description>You're right about $_COOKIE.  That's a typo, that I just fixed, from when I came back and added those lines.  

I don't think you need to check for a session.  If there's not an active session than the isset() will catch that the variable isn't set.  Of course I may be wrong.  What error would come up in case a session wasn't started?</description>
		<content:encoded><![CDATA[<p>You&#8217;re right about $_COOKIE.  That&#8217;s a typo, that I just fixed, from when I came back and added those lines.  </p>
<p>I don&#8217;t think you need to check for a session.  If there&#8217;s not an active session than the isset() will catch that the variable isn&#8217;t set.  Of course I may be wrong.  What error would come up in case a session wasn&#8217;t started?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://www.nutt.net/2004/12/27/a-quick-php-function-to-get-post-get-or-session-variables-and-cookies-too/#comment-31574</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Mon, 16 Jun 2008 17:34:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.nutt.net/archive/2004/12/27/a-quick-php-function-to-get-post-get-or-session-variables-and-cookies-too/52.html#comment-31574</guid>
		<description>There are a few things wrong with this code.  Line 28, instead of looking in $_COOKIE, attempts to call a function $_SESSION. (And $_SESSION is, of course, actually an array rather than a function.) And no check is made as to whether there is a session, which could result in a failure at line 22.</description>
		<content:encoded><![CDATA[<p>There are a few things wrong with this code.  Line 28, instead of looking in $_COOKIE, attempts to call a function $_SESSION. (And $_SESSION is, of course, actually an array rather than a function.) And no check is made as to whether there is a session, which could result in a failure at line 22.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
