<?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; php post</title>
	<atom:link href="http://readytousesolutions.com/phpblog/tag/php-post/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 : Forms processing with $_POST or $_GET</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-forms-processing-with-_post-or-_get/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-forms-processing-with-_post-or-_get/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 08:11:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basic PHP]]></category>
		<category><![CDATA[$_GET]]></category>
		<category><![CDATA[$_POST]]></category>
		<category><![CDATA[get]]></category>
		<category><![CDATA[php $_GET]]></category>
		<category><![CDATA[php $_POST]]></category>
		<category><![CDATA[php forms]]></category>
		<category><![CDATA[php forms processing]]></category>
		<category><![CDATA[php get]]></category>
		<category><![CDATA[php post]]></category>
		<category><![CDATA[php server variables]]></category>
		<category><![CDATA[post]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=169</guid>
		<description><![CDATA[Are you just curious to know the difference between $_GET and $_POST php server variables? Errrr, let me try and explain. I dont see many differences, or maybe I dont know/explain, but what I understand it is that $_POST it&#8217;s &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-forms-processing-with-_post-or-_get/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Are you just curious to know the difference between $_GET and $_POST php server variables? Errrr, let me try and explain. I dont see many differences, or maybe I dont know/explain, but what I understand it is that $_POST it&#8217;s used in most of the cases because security, and $_GET will show your entered forms fields values into the url. For example :</p>
<pre class="php">
<span class="htmlFormTag">&lt;form action=<span class="htmlAttributeValue">&quot;&quot;</span> method=<span class="htmlAttributeValue">&quot;POST&quot;</span>&gt;</span>
Your field value here <span class="htmlFormTag">&lt;input type=<span class="htmlAttributeValue">&quot;text&quot;</span> name=<span class="htmlAttributeValue">&quot;fieldname&quot;</span>&gt;</span>
<span class="htmlFormTag">&lt;input type=<span class="htmlAttributeValue">&quot;submit&quot;</span> name=<span class="htmlAttributeValue">&quot;sb&quot;</span> id=<span class="htmlAttributeValue">&quot;sb&quot;</span> value=<span class="htmlAttributeValue">&quot;Go&quot;</span>&gt;</span>
<span class="htmlFormTag">&lt;/form&gt;</span>
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
<span class="phpComment">//check<span class="phpKeyword"> if </span>form was sent
</span>
<span class="phpKeyword">
if<span class="phpOperator">(</span></span><span class="phpFunction">isset</span><span class="phpOperator">(</span><span class="phpScriptVar">$_POST</span><span class="phpOperator">[</span><span class="phpString">'sb'</span><span class="phpOperator">]</span><span class="phpOperator">)</span><span class="phpOperator">)</span> <span class="phpOperator">{</span>
<span class="phpFunction">print</span> <span class="phpScriptVar">$_POST</span><span class="phpOperator">[</span><span class="phpString">'fieldname'</span><span class="phpOperator">]</span><span class="phpText">;</span>
<span class="phpOperator">}</span>
<span class="phpComment">//this with post will not show values into url
</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
<span class="htmlFormTag">&lt;form action=<span class="htmlAttributeValue">&quot;&quot;</span> method=<span class="htmlAttributeValue">&quot;GET&quot;</span>&gt;</span>
Your field value here <span class="htmlFormTag">&lt;input type=<span class="htmlAttributeValue">&quot;text&quot;</span> name=<span class="htmlAttributeValue">&quot;fieldname&quot;</span>&gt;</span>
<span class="htmlFormTag">&lt;input type=<span class="htmlAttributeValue">&quot;submit&quot;</span> name=<span class="htmlAttributeValue">&quot;sb&quot;</span> id=<span class="htmlAttributeValue">&quot;sb&quot;</span> value=<span class="htmlAttributeValue">&quot;Go&quot;</span>&gt;</span>
<span class="htmlFormTag">&lt;/form&gt;</span>
As for get, you will see after you submit your form that value entered will showup in url
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
<span class="phpKeyword">
if<span class="phpOperator">(</span></span><span class="phpFunction">isset</span><span class="phpOperator">(</span><span class="phpScriptVar">$_GET</span><span class="phpOperator">[</span><span class="phpString">'sb'</span><span class="phpOperator">]</span><span class="phpOperator">)</span><span class="phpOperator">)</span> <span class="phpOperator">{</span>
<span class="phpFunction">print</span> <span class="phpScriptVar">$_GET</span><span class="phpOperator">[</span><span class="phpString">'fieldname'</span><span class="phpOperator">]</span><span class="phpText">;</span>
<span class="phpOperator">}</span>
<span class="phpComment">//and check your url,<span class="phpKeyword"> if </span><span class="htmlText">you make a forms</span><span class="phpOperator">.</span>php page, and hit submit you&#039;ll see //forms<span class="phpOperator">.</span><span class="htmlText">php</span><span class="phpOperator">?</span>fieldname=whatyouentered&#038;amp<span class="phpText">;</span><span class="htmlText">sb</span><span class="phpOperator">=</span>Go
</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-forms-processing-with-_post-or-_get/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

