<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: PHP Contact form script</title>
	<atom:link href="http://www.mattvarone.com/web-design/php-contact-form-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mattvarone.com/web-design/php-contact-form-script/</link>
	<description>Creative Developer</description>
	<lastBuildDate>Fri, 12 Mar 2010 12:28:56 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bastien</title>
		<link>http://www.mattvarone.com/web-design/php-contact-form-script/#comment-1831</link>
		<dc:creator>Bastien</dc:creator>
		<pubDate>Sat, 21 Nov 2009 22:14:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattvarone.com/?p=244#comment-1831</guid>
		<description>Regards</description>
		<content:encoded><![CDATA[<p>Regards</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: &#34;On-site&#34; email script?</title>
		<link>http://www.mattvarone.com/web-design/php-contact-form-script/#comment-1488</link>
		<dc:creator>&#34;On-site&#34; email script?</dc:creator>
		<pubDate>Fri, 05 Jun 2009 00:23:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattvarone.com/?p=244#comment-1488</guid>
		<description>[...] form using PHP &#124; Code Tricks- Tips and tricks on PHP, CGI, JavaScript, ASP, XML, CSS, and more!  PHP Contact form script </description>
		<content:encoded><![CDATA[<p>[...] form using PHP | Code Tricks- Tips and tricks on PHP, CGI, JavaScript, ASP, XML, CSS, and more!  PHP Contact form script</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://www.mattvarone.com/web-design/php-contact-form-script/#comment-299</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Mon, 20 Oct 2008 00:55:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattvarone.com/?p=244#comment-299</guid>
		<description>Hi Ryan, 
Thanks for stopping by. There are multiples ways to achieve what you want, a simple way would be to add a hidden field in your html file with the section name and then run a conditional check in sendmail.php to see from wich page  the user sent the form, and from there send the email to the correct recipient.

&lt;strong&gt;HTML&lt;/strong&gt;

&lt;code&gt;&lt;input type=&quot;hidden&quot; name=&quot;destination&quot; value=&quot;marketing&quot; id=&quot;destination&quot;/&gt;&lt;/code&gt;
or
&lt;code&gt;&lt;input type=&quot;hidden&quot; name=&quot;destination&quot; value=&quot;sales&quot; id=&quot;destination&quot;/&gt;&lt;/code&gt;

&lt;strong&gt;PHP&lt;/strong&gt;

replace in &lt;em&gt;sendmail.php&lt;/em&gt; the line 29 ( $szRecipient = &quot;email@somedomain.com&quot;; ) with:

&lt;pre&gt;&lt;code&gt;&lt;?php
if ( $_POST[&#039;destination&#039;] ) 
{
	switch ( $_POST[&#039;destination&#039;] ) 
	{
		case &#039;marketing&#039;:
			$szRecipient = &quot;marketing@somedomain.com&quot;
			break;
		
		case &#039;sales&#039;:
			$szRecipient = &quot;sales@somedomain.com&quot;
			break;
		
		default:
			$szRecipient = &quot;email@somedomain.com&quot;
			break;
	}
} 
else 
{
	die(&#039;Please specify a destination.&#039;)
}
?&gt;&lt;/code&gt;&lt;/pre&gt;

Hope that helps,
Cheers!</description>
		<content:encoded><![CDATA[<p>Hi Ryan,<br />
Thanks for stopping by. There are multiples ways to achieve what you want, a simple way would be to add a hidden field in your html file with the section name and then run a conditional check in sendmail.php to see from wich page  the user sent the form, and from there send the email to the correct recipient.</p>
<p><strong>HTML</strong></p>
<p><code>&lt;input type=&quot;hidden&quot; name=&quot;destination&quot; value=&quot;marketing&quot; id=&quot;destination&quot;/&gt;</code><br />
or<br />
<code>&lt;input type=&quot;hidden&quot; name=&quot;destination&quot; value=&quot;sales&quot; id=&quot;destination&quot;/&gt;</code></p>
<p><strong>PHP</strong></p>
<p>replace in <em>sendmail.php</em> the line 29 ( $szRecipient = &quot;email@somedomain.com&quot;; ) with:</p>
<pre><code>&lt;?php
if ( $_POST[&#39;destination&#39;] )
{
	switch ( $_POST[&#39;destination&#39;] )
	{
		case &#39;marketing&#39;:
			$szRecipient = &quot;marketing@somedomain.com&quot;
			break;

		case &#39;sales&#39;:
			$szRecipient = &quot;sales@somedomain.com&quot;
			break;

		default:
			$szRecipient = &quot;email@somedomain.com&quot;
			break;
	}
}
else
{
	die(&#39;Please specify a destination.&#39;)
}
?&gt;</code></pre>
<p>Hope that helps,<br />
Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan</title>
		<link>http://www.mattvarone.com/web-design/php-contact-form-script/#comment-297</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sun, 19 Oct 2008 20:40:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattvarone.com/?p=244#comment-297</guid>
		<description>Hi man,

Nice simple script. How would one go about having a number of different recipients that I want to be able to select for the user (perhaps through hiding the field)?

For example, say the website is split up into sales and marketing. If someone is on the sales page, I want to send the e-mail to the sales e-mail address, but if they are on the marketing page, I want it to be sent to that e-mail contact. Does that make sense?

I still have yet to come accross a solution and was hoping you could help. Thanks!</description>
		<content:encoded><![CDATA[<p>Hi man,</p>
<p>Nice simple script. How would one go about having a number of different recipients that I want to be able to select for the user (perhaps through hiding the field)?</p>
<p>For example, say the website is split up into sales and marketing. If someone is on the sales page, I want to send the e-mail to the sales e-mail address, but if they are on the marketing page, I want it to be sent to that e-mail contact. Does that make sense?</p>
<p>I still have yet to come accross a solution and was hoping you could help. Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sam</title>
		<link>http://www.mattvarone.com/web-design/php-contact-form-script/#comment-131</link>
		<dc:creator>Sam</dc:creator>
		<pubDate>Sat, 20 Sep 2008 23:21:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.mattvarone.com/?p=244#comment-131</guid>
		<description>The script looks rather good, thanks for sharing! keep up the good work!!</description>
		<content:encoded><![CDATA[<p>The script looks rather good, thanks for sharing! keep up the good work!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
