<?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; Basic PHP</title>
	<atom:link href="http://readytousesolutions.com/phpblog/category/basic-php/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 : Write to a file with fwrite</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-write-to-a-file-with-fwrite/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-write-to-a-file-with-fwrite/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 05:22:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basic PHP]]></category>
		<category><![CDATA[file handle]]></category>
		<category><![CDATA[fwrite]]></category>
		<category><![CDATA[php file handle]]></category>
		<category><![CDATA[php fwrite]]></category>
		<category><![CDATA[php write to a file]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=257</guid>
		<description><![CDATA[I showed you earlier in a older post how to open and read text contents from a file. Now it&#8217;s time to see how to write to a file using php function called fwrite(). &#60;?php $theFileToWriteTo = "textFile.txt"; $fileHandle = &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-write-to-a-file-with-fwrite/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I showed you earlier in a older post how to open and read text contents from a file. Now it&#8217;s time to see how to write to a file using php function called fwrite().</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$theFileToWriteTo <span class="phpOperator">=</span> <span class="phpString">"textFile.txt"</span><span class="phpText">;</span>
$fileHandle <span class="phpOperator">=</span> <span class="phpFunction">fopen</span><span class="phpOperator">(</span>$theFileToWriteTo, <span class="phpString">'w'</span><span class="phpOperator">)</span><span class="htmlText"> or </span><span class="phpFunction">die</span><span class="phpOperator">(</span><span class="phpString">"cannot open the text file"</span><span class="phpOperator">)</span><span class="phpText">;</span>
$textToWrite <span class="phpOperator">=</span> <span class="phpString">"First text to write here\n"</span><span class="phpText">;</span>
<span class="phpFunction">fwrite</span><span class="phpOperator">(</span>$fileHandle, $textToWrite<span class="phpOperator">)</span><span class="phpText">;</span>
$textToWrite <span class="phpOperator">=</span> <span class="phpString">"Second line to write here\n"</span><span class="phpText">;</span>
<span class="phpFunction">fwrite</span><span class="phpOperator">(</span>$fileHandle, $textToWrite<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">fclose</span><span class="phpOperator">(</span>$fileHandle<span class="phpOperator">)</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<p>Note that &#8220;\n&#8221; means new line!</p>
]]></content:encoded>
			<wfw:commentRss>http://readytousesolutions.com/phpblog/php-tutorial-write-to-a-file-with-fwrite/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Tutorial : Multiple string replace with str_replace</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-multiple-string-replace-with-str_replace/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-multiple-string-replace-with-str_replace/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 04:58:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basic PHP]]></category>
		<category><![CDATA[php multi str_replace]]></category>
		<category><![CDATA[php multiple string replace]]></category>
		<category><![CDATA[php multiple str_replace]]></category>
		<category><![CDATA[php string replace]]></category>
		<category><![CDATA[php str_replace]]></category>
		<category><![CDATA[string replace]]></category>
		<category><![CDATA[str_replace]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=255</guid>
		<description><![CDATA[Well, I already writed about str_replace php function but this tip is very usefull. To recap, the function it&#8217;s used to replace a string by using three paramaters : $stringToSearch, $stringToReplace, $intoString. I showed you how to use it in &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-multiple-string-replace-with-str_replace/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Well, I already writed about str_replace php function but this tip is very usefull. To recap, the function it&#8217;s used to replace a string by using three paramaters : $stringToSearch, $stringToReplace, $intoString. I showed you how to use it in single operations but we can use it for multiple replaces in one place, by using arrays :</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$searchArray <span class="phpOperator">=</span> <span class="phpFunction">array</span><span class="phpOperator">(</span><span class="phpString">"word1"</span>, <span class="phpString">"sound2"</span>, <span class="phpString">"etc3"</span><span class="phpOperator">)</span><span class="phpText">;</span>
$replaceArray <span class="phpOperator">=</span> <span class="phpFunction">array</span><span class="phpOperator">(</span><span class="phpString">"word one"</span>, <span class="phpString">"sound two"</span>, <span class="phpString">"etc three"</span><span class="phpOperator">)</span><span class="phpText">;</span>
$intoString <span class="phpOperator">=</span> <span class="phpString">"Here is word1,<span class="phpKeyword"> as </span>well sound2 and etc3"</span><span class="phpText">;</span>
<span class="phpComment">//now let&#039;s replace
</span>
<span class="htmlText">
print </span><span class="phpFunction">str_replace</span><span class="phpOperator">(</span>$searchArray, $replaceArray, $intoString<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpComment">//it should print <span class="phpString">"Here is word one,<span class="phpKeyword"> as </span>well sound two and etc three"</span>
</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<p>I have to say this multiple replace &#8220;trick&#8221; is a very nice one!</p>
<p>See ya soon!</p>
]]></content:encoded>
			<wfw:commentRss>http://readytousesolutions.com/phpblog/php-tutorial-multiple-string-replace-with-str_replace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Tutorial : Strpos and Strrpos</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-strpos-and-strrpos/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-strpos-and-strrpos/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 15:31:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basic PHP]]></category>
		<category><![CDATA[Find position of first occurrence of a string]]></category>
		<category><![CDATA[occurrence]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[strpos]]></category>
		<category><![CDATA[strrpos]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=251</guid>
		<description><![CDATA[Basic thing, strpos and strrpos are two php functions which are used to find the position of first and/or last occurrence in a string &#8211; word (usefull for example when you want to build a function to get file extension). &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-strpos-and-strrpos/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Basic thing, strpos and strrpos are two php functions which are used to find the position of first and/or last occurrence in a string &#8211; word (usefull for example when you want to build a function to get file extension). I hear you saying enough talking, let me see the available examples :</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
<span class="phpComment">//get first occurrence
</span>
$string <span class="phpOperator">=</span> <span class="phpString">"this string"</span><span class="phpText">;</span>
$find <span class="phpOperator">=</span> <span class="phpString">"i"</span><span class="phpText">;</span>
<span class="htmlText">
print </span><span class="phpFunction">strpos</span><span class="phpOperator">(</span>$string,$find<span class="phpOperator">)</span><span class="phpText">;</span><span class="phpComment">//should print <span class="phpNumber">2</span>
</span>
<span class="htmlText">
print </span><span class="phpFunction">strrpos</span><span class="phpOperator">(</span>$string,$find<span class="phpOperator">)</span><span class="phpText">;</span> <span class="phpComment">//should print <span class="phpNumber">8</span>
</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-strpos-and-strrpos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Tutorial : String lenght with strlen</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-string-lenght-with-strlen/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-string-lenght-with-strlen/#comments</comments>
		<pubDate>Tue, 26 May 2009 20:13:34 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basic PHP]]></category>
		<category><![CDATA[php count characters]]></category>
		<category><![CDATA[php count digits]]></category>
		<category><![CDATA[php string lenght]]></category>
		<category><![CDATA[php strlen]]></category>
		<category><![CDATA[string lenght]]></category>
		<category><![CDATA[strlen]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=228</guid>
		<description><![CDATA[I&#8217;ll be directly on this short one. Shame on me that I didn&#8217;t writed about this untill now : there&#8217;s an interesting php function which you might need frequently called strlen() which translates into string lenght. I&#8217;m sure you met &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-string-lenght-with-strlen/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll be directly on this short one. Shame on me that I didn&#8217;t writed about this untill now : there&#8217;s an interesting php function which you might need frequently called strlen() which translates into string lenght. I&#8217;m sure you met it already into previous tutorials on this php tutorials blog but I think I didn&#8217;t made a post separately for this only so :</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$stringLenght <span class="phpOperator">=</span> <span class="phpString">"Count this characters"</span><span class="phpText">;</span>
<span class="htmlText">
print </span><span class="phpFunction">strlen</span><span class="phpOperator">(</span>$stringLenght<span class="phpOperator">)</span><span class="phpText">;</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-string-lenght-with-strlen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Tutorial : If condition in the short way (shorthand if)</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-if-condition-in-the-short-way/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-if-condition-in-the-short-way/#comments</comments>
		<pubDate>Thu, 21 May 2009 12:52:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basic PHP]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[if condition]]></category>
		<category><![CDATA[if function]]></category>
		<category><![CDATA[php if]]></category>
		<category><![CDATA[short if]]></category>
		<category><![CDATA[shorthand if]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=225</guid>
		<description><![CDATA[Do you know basical php if() condition right? But, my questions is : do you know the short way? If not, I will show you the diferrence,: &#60;?php $a=1; $b=3; $c = $a+$b; //THE SHORT WAY COMES print $c == &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-if-condition-in-the-short-way/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Do you know basical php if() condition right? But, my questions is : do you know the short way? If not, I will show you the diferrence,:</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$a=<span class="phpNumber">1</span><span class="phpText">;</span>
$b<span class="phpOperator">=</span>3;
$c <span class="phpOperator">=</span> $a<span class="phpOperator">+</span>$b<span class="phpText">;</span>
<span class="phpComment">//THE SHORT WAY COMES
</span><span class="phpFunction">print</span> $c <span class="phpOperator"><span class="phpOperator">=</span>=</span> <span class="phpNumber">3</span> <span class="phpOperator">?</span> <span class="phpString">"yes $c <span class="phpOperator">=</span> <span class="phpNumber">3</span>"</span> <span class="phpOperator">:</span> <span class="phpString">"no $c <span class="phpOperator">!</span><span class="phpOperator">=</span> <span class="phpNumber">3</span>"</span><span class="phpText">;</span>
<span class="phpComment">//THE <span class="phpString">"COMMON"</span> WAY SAME THING
</span>
<span class="phpKeyword">
if<span class="phpOperator">(</span></span>$c <span class="phpOperator"><span class="phpOperator">=</span>=</span><span class="phpNumber">3</span><span class="phpOperator">)</span> <span class="phpOperator">{</span>
<span class="phpFunction">print</span> <span class="phpString">"yes $c <span class="phpOperator">=</span> <span class="phpNumber">3</span>"</span><span class="phpText">;</span>
<span class="phpKeyword"><span class="phpOperator">}</span><span class="htmlText">else</span><span class="phpOperator">{</span></span>
<span class="phpFunction">print</span> <span class="phpString">"no $c <span class="phpOperator">!</span><span class="phpOperator">=</span> <span class="phpNumber">3</span>"</span><span class="phpText">;</span>
<span class="phpOperator">}</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-if-condition-in-the-short-way/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP Tutorial : PHP $_POST array</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-php-_post-array/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-php-_post-array/#comments</comments>
		<pubDate>Sun, 12 Apr 2009 09:40:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basic PHP]]></category>
		<category><![CDATA[$_POST array]]></category>
		<category><![CDATA[php $_POST]]></category>
		<category><![CDATA[php $_POST array]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=182</guid>
		<description><![CDATA[Hello folks, BTW Happy Easter,my traffic this weekend decreased dramatically because of the hollidays, I hope you enjoy it. I want to clarify something that I might missed to say about php $_POST : this $_POST is an php array, &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-php-_post-array/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hello folks,</p>
<p>BTW Happy Easter,my traffic this weekend decreased dramatically because of the hollidays, I hope you enjoy it.</p>
<p>I want to clarify something that I might missed to say about php $_POST : this $_POST is an php array, if you want to see yourself, make recursive print with print_r() function. For example if you have a form, you can get all values in one time with this php $_POST array by typing</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
<span class="phpFunction">print_r</span><span class="phpOperator">(</span><span class="phpScriptVar">$_POST</span><span class="phpOperator">)</span><span class="phpText">;</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-php-_post-array/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP Tutorial : Substract part of string with substr</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-substract-part-of-string-with-substr/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-substract-part-of-string-with-substr/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 07:16:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basic PHP]]></category>
		<category><![CDATA[php part of a string]]></category>
		<category><![CDATA[php substr]]></category>
		<category><![CDATA[php substract part of a string]]></category>
		<category><![CDATA[substr]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=180</guid>
		<description><![CDATA[Hello, I didn&#8217;t posted for a long time because I am simply stucked into finding a subject. I made a search into my own blog and I saw that (miraculous btw) I didn&#8217;t writed yet about substr function which helps &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-substract-part-of-string-with-substr/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hello,</p>
<p>I didn&#8217;t posted for a long time because I am simply stucked into finding a subject. I made a search into my own blog and I saw that (miraculous btw) I didn&#8217;t writed yet about substr function which helps you to print only a part of a string &#8211; substract it!</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$stringIs <span class="phpOperator">=</span> <span class="phpString">"mystring"</span><span class="phpText">;</span>
$substract <span class="phpOperator">=</span> <span class="phpFunction">substr</span><span class="phpOperator">(</span>$stringIs, <span class="phpNumber">0</span>, <span class="phpNumber">3</span><span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpFunction">print</span> $subtract; <span class="phpComment">//this will <span class="phpFunction">print</span> my
</span>
<span class="phpScriptTag"><span class="phpOperator">?</span><span class="phpOperator">&gt;</span></span>
</pre>
<p>First you declare the string you want substracted, then first number means from where to start and the last no. means where to finish.</p>
<p>Taddaaa!</p>
]]></content:encoded>
			<wfw:commentRss>http://readytousesolutions.com/phpblog/php-tutorial-substract-part-of-string-with-substr/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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>
		<item>
		<title>PHP Tutorial : Clear white spaces</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-clear-white-spaces/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-clear-white-spaces/#comments</comments>
		<pubDate>Mon, 23 Mar 2009 15:23:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basic PHP]]></category>
		<category><![CDATA[clear blank spaces]]></category>
		<category><![CDATA[clear extra spaces]]></category>
		<category><![CDATA[clear extra white spaces]]></category>
		<category><![CDATA[clear white spaces]]></category>
		<category><![CDATA[php clear extra spaces]]></category>
		<category><![CDATA[php clear extra white spaces]]></category>
		<category><![CDATA[php clear white spaces]]></category>
		<category><![CDATA[php trim]]></category>
		<category><![CDATA[trim]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=167</guid>
		<description><![CDATA[Ever got extra white spaces and dont wanna clear them manually or just cannot? In PHP, we have a great function called trim(), which will do your job. If you made a .htaccess rewrite (most of the cases), or just &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-clear-white-spaces/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Ever got extra white spaces and dont wanna clear them manually or just cannot? In PHP, we have a great function called trim(), which will do your job. If you made a .htaccess rewrite (most of the cases), or just a form input to validate and clear its extra white spaces just do a trim().</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$extraWhiteSpace <span class="phpOperator">=</span> <span class="phpString">" bla bllla  b   l      a"</span><span class="phpText">;</span>
$extraWhiteSpace <span class="phpOperator">=</span> <span class="phpFunction">trim</span><span class="phpOperator">(</span>$extraWhiteSpace<span class="phpOperator">)</span><span class="phpText">;</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-clear-white-spaces/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>PHP Tutorial : Lowercase characters</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-lowercase-characters/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-lowercase-characters/#comments</comments>
		<pubDate>Thu, 19 Mar 2009 07:28:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Basic PHP]]></category>
		<category><![CDATA[Lowercase characters]]></category>
		<category><![CDATA[lowercase string]]></category>
		<category><![CDATA[string to lower]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=165</guid>
		<description><![CDATA[In a recent post I&#8217;ve been writed about converting string to uppercase, now we need to know how to convert characters into lowercase. That will need strtolower() function which means string to lower. &#60;?php $bigger = "This Is Big"; $lower &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-lowercase-characters/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In a recent post I&#8217;ve been writed about converting string to uppercase, now we need to know how to convert characters into lowercase. That will need strtolower() function which means string to lower.</p>
<pre class="php">
<span class="phpScriptTag"><span class="phpOperator">&lt;</span><span class="phpOperator">?</span>php</span>
$bigger <span class="phpOperator">=</span> <span class="phpString">"This Is Big"</span><span class="phpText">;</span>
$lower <span class="phpOperator">=</span> <span class="phpFunction">strtolower</span><span class="phpOperator">(</span>$bigger<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpComment">//will print this is big
</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-lowercase-characters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

