<?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>Web design and development in London and Surrey &#187; contact form</title>
	<atom:link href="http://zorinweb.com/tag/contact-form/feed/" rel="self" type="application/rss+xml" />
	<link>http://zorinweb.com</link>
	<description>Just another Web design and development weblog</description>
	<lastBuildDate>Fri, 13 Jan 2012 14:56:03 +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>Grabbing PHP Form variables with the Extract() Function</title>
		<link>http://zorinweb.com/2009/12/grabbing-php-form-variables-with-the-extract-function/</link>
		<comments>http://zorinweb.com/2009/12/grabbing-php-form-variables-with-the-extract-function/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 19:31:40 +0000</pubDate>
		<dc:creator>ZorinWeb</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[contact form]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php function]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://zorinweb.com/?p=135</guid>
		<description><![CDATA[The extract() function is a quick and convenient way of grabbing form variables. Rather than going through the entire $_POST array assigning variables to each element, simply do the following: extract( $_POST ); This creates a value pair corresponding to each key/value pair in the $_POST array (the elements in the contact form). So, the [...]]]></description>
			<content:encoded><![CDATA[<p>The extract() function is a quick and convenient way of grabbing form variables. Rather than going through the entire $_POST array assigning variables to each element, simply do the following:</p>
<p><span id="more-135"></span></p>
<p><code>extract( $_POST );</code></p>
<p>This creates a value pair corresponding to each key/value pair in the $_POST array (the elements in the contact form). So, the names in the posted form fields become the variable names, whose values are automatically assigned to their respective form values.</p>
<p>Take the following basic form:<br />
<code><br />
&lt;form action="emailSent.php" method="post"&gt;<br />
&lt;fieldset&gt;<br />
&lt;legend&gt;Personal information&lt;/legend&gt;<br />
&lt;label&gt;Name&lt;/label&gt;&lt;input type="text" name="name" /&gt;<br />
&lt;label&gt;Email address&lt;/label&gt;&lt;input type="text" name="email" /&gt;<br />
&lt;label&gt;Telephone&lt;/label&gt;&lt;input type="text" name="phone" /&gt;<br />
&lt;/fieldset&gt;<br />
&lt;strong&gt;&lt;label&gt;Message&lt;/label&gt;<br />
&lt;textarea name="message" &gt;&lt;/textarea&gt;<br />
&lt;input type="submit" name="SUBMIT" value="SUBMIT" /&gt;<br />
&lt;/form&gt;<br />
</code><br />
Upon clicking &#8216;submit&#8217;, the form&#8217;s sent to the processing script, &#8216;emailSent.php&#8217;. There, the extract() function would appear:</p>
<p><code>extract( $_POST );</code></p>
<p>Which would immediately capture the $_POST array elements as:<br />
<code><br />
$name=name;<br />
$email=email;<br />
$phone=phone;<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://zorinweb.com/2009/12/grabbing-php-form-variables-with-the-extract-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

