<?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>iTechLog &#187; html form</title>
	<atom:link href="http://itechlog.com/tag/html-form/feed/" rel="self" type="application/rss+xml" />
	<link>http://itechlog.com</link>
	<description>Your source to IT solutions, interesting technology news and code snipets.</description>
	<lastBuildDate>Tue, 10 Jan 2012 17:06:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Automatically display form data with PHP</title>
		<link>http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/</link>
		<comments>http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/#comments</comments>
		<pubDate>Wed, 13 May 2009 12:23:44 +0000</pubDate>
		<dc:creator>Alex Costa</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Programming]]></category>
		<category><![CDATA[$_POST]]></category>
		<category><![CDATA[foreach()]]></category>
		<category><![CDATA[html form]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://itechlog.com/?p=723</guid>
		<description><![CDATA[<a href="http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/" title="Automatically display form data with PHP"></a>This is a simple PHP  script to automatically display (dump output)  data submited from a html form. The form setup all inputs (form fields) need to have the same name with [] at the end to turn it into an &#8230;<p class="read-more"><a href="http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/" title="Automatically display form data with PHP"></a><p>This is a simple PHP  script to automatically display (<strong>dump output</strong>)  data submited from a html form.</p>
<p><strong>The form setup</strong></p>
<ul>
<li>all inputs (form fields) need to have the same name with [] at the end to turn it into an array,  e.g &lt;input type=text name=formdata[]&gt;</li>
</ul>
<p style="padding-left: 30px;">formq.html content</p>
<p style="padding-left: 30px;"><span style="color: #3366ff;">&lt;form method=post action=showme.php&gt;<br />
Name: &lt;input type=text name=formdata[]&gt;&lt;br&gt;<br />
Email: &lt;input type=text name=formdata[]&gt;&lt;br&gt;<br />
</span></p>
<p style="padding-left: 30px;"><span style="color: #3366ff;">&lt;input type=submit value=ok&gt;<br />
&lt;/form&gt;</span>
</p>
<p style="padding-left: 30px;">
<p><strong>The Script setup</strong></p>
<p style="padding-left: 30px;">showme.php content</p>
<p style="padding-left: 30px;"><span style="color: #3366ff;">&lt;?php<br />
$data = $_POST['formdata']; # get value from the form fields</span>
</p>
<p style="padding-left: 30px;"><span style="color: #3366ff;">foreach ( $data as $key =&gt; $value ) { # loop through array collecting the results</span></p>
<p style="padding-left: 30px;"><span style="color: #3366ff;">echo  &#8220;$value&lt;br&gt;&#8221;;  # output the data  &#8211; print to page<br />
}<br />
?&gt;</span></p>

<!-- start wp-tags-to-technorati 1.02 -->

<p class='technorati-tags'>Technorati Tags: <a class='technorati-link' href='http://technorati.com/tag/%24_POST' rel='tag' target='_self'>$_POST</a>, <a class='technorati-link' href='http://technorati.com/tag/foreach%28%29' rel='tag' target='_self'>foreach()</a>, <a class='technorati-link' href='http://technorati.com/tag/html+form' rel='tag' target='_self'>html form</a>, <a class='technorati-link' href='http://technorati.com/tag/PHP' rel='tag' target='_self'>PHP</a>, <a class='technorati-link' href='http://technorati.com/tag/Programming' rel='tag' target='_self'>Programming</a></p>

<!-- end wp-tags-to-technorati -->
<h3  class="related_post_title">Related Posts</h3><ul class="related_post"><li>December 4, 2008 -- <a href="http://itechlog.com/web-programming/2008/12/04/search-engine-optimization-seo-in-php-book/" title="Search Engine Optimization  SEO in PHP (Book)">Search Engine Optimization  SEO in PHP (Book)</a></li><li>November 7, 2011 -- <a href="http://itechlog.com/programming/2011/11/07/arduino-the-open-source-hardware/" title="Arduino the Open Source hardware">Arduino the Open Source hardware</a></li><li>August 10, 2011 -- <a href="http://itechlog.com/code-snipets/2011/08/10/cardsave-error-transaction-datetime-expired/" title="Cardsave error &#8220;transaction date/time expired&#8221;">Cardsave error &#8220;transaction date/time expired&#8221;</a></li><li>January 31, 2011 -- <a href="http://itechlog.com/web-programming/2011/01/31/it-is-not-safe-to-rely-on-the-systems-timezone-settings/" title="It is not safe to rely on the system’s timezone settings">It is not safe to rely on the system’s timezone settings</a></li><li>July 8, 2009 -- <a href="http://itechlog.com/itechlog-news/2009/07/08/android-to-iphone-apps-with-xml/" title="Android to iPhone Apps with XML">Android to iPhone Apps with XML</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://itechlog.com/web-programming/2009/05/13/automatically-display-form-data-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

