<?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>NewSourceMedia Blog &#187; PHP Tips and Tutorials Email Systems</title>
	<atom:link href="http://newsourcemedia.com/blog/tag/php-tips-and-tutorials-email-systems/feed/" rel="self" type="application/rss+xml" />
	<link>http://newsourcemedia.com/blog</link>
	<description>Focused on Interactive Design, Development and Marketing</description>
	<lastBuildDate>Mon, 07 May 2012 01:26:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PHP Email Form Easy</title>
		<link>http://newsourcemedia.com/blog/php-email-form-easy/</link>
		<comments>http://newsourcemedia.com/blog/php-email-form-easy/#comments</comments>
		<pubDate>Fri, 02 Jul 2004 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Forms]]></category>
		<category><![CDATA[comunication]]></category>
		<category><![CDATA[cyberxmedia]]></category>
		<category><![CDATA[PHP Email Form Easy]]></category>
		<category><![CDATA[PHP Tips and Tutorials Email Systems]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/1969/12/31/php-email-form-easy/</guid>
		<description><![CDATA[Now you can send emails from your web sites with full control over design style and functionality. PHP is the way to go for online email form. Here is how to get started. Now you can send emails from your &#8230; <a href="http://newsourcemedia.com/blog/php-email-form-easy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[Now you can send emails from your web sites with full control over design style and functionality. PHP is the way to go for online email form. Here is how to get started.
<span id="more-222"></span>Now you can send emails from your web sites with full control over design            style and functionality. PHP is the way to go for online email form.            Here is how to get started.

<strong>Step 1: Create E-Mail Form</strong>

Here is a sample html email form

<span style="color: #009900;">&lt;form action="" method="post"&gt;</span><span style="color: #003399;">
Name: &lt;br&gt;
&lt;input type="text" name="name"&gt;
&lt;br&gt;
Email: &lt;br&gt;
&lt;input type="text" name="email"&gt;
&lt;br&gt;
Subject: &lt;br&gt;
&lt;input type="text" name="subject"&gt;
&lt;br&gt;
Text:&lt;br&gt;
&lt;textarea name="message" cols="" rows=""&gt;&lt;/textarea&gt;&lt;br&gt;
&lt;input type="submit" name="submit" value="Send"&gt;
&lt;input type="reset" name="Reset" value="Reset"&gt;
<span style="color: #009900;">&lt;/form&gt;</span></span>

Copy the html code above and past it into a file with the name contactus.php

Now its time to add the php code.

<strong>Step 2: Sending the data</strong>

We will first check to see if the form was submitted then we will check to see if all fields were filled in. If all is well, we well send each form data to it's perspective variables (indicated by the sign "$") and send out the email with a successful message. If all field were not filled-in, then display an error message. The php code is below.

<span style="color: #006600;">&lt;?php
if ($submit) { <span style="color: #ff9900;">// if the form was sent do the            following</span></span>

<span style="color: #006600;">if($name &amp;&amp; $subject            &amp;&amp; $email &amp;&amp; $message ) { <span style="color: #ff9900;">// if            all fields were filled-in send email</span>
mail("you@youraddress.com","$subject","$message","From:            $name &lt;$email&gt;") or die("email error");
echo "Message Sent"; <span style="color: #ff9900;">// if all went            well, display message was sent</span>
} else {
echo "All fields must be filled in!&lt;BR&gt;"; <span style="color: #ff9900;">//            if not all were filled in, display error message</span>
}
} <span style="color: #ff9900;">// end php submission code</span>
?&gt;</span>

Now just copy and past the php code above into the "contactus.php"    file. You can place it anywhere inside the body tag and it will work just fine.

Be sure to check for the next PHP Advanced Email Form coming soon to NewSourceMedia.com    .

<!--   Start of HTML Code   --->
<table border="1" cellspacing="0" cellpadding="4" width="250" bgcolor="#d70500" bordercolor="#840300"><form action="http://www.hotscripts.com/cgi-bin/rate.cgi" method="post">
<tbody>
<tr>
<td>
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<td><strong><span style="font-family: Verdana,Arial; color: #ffffff; font-size: xx-small;">If you like our  script, please rate it!</span></strong>

<input name="ID" type="hidden" value="28522" /> <input name="external" type="hidden" value="1" /></td>
</tr>
<tr>
<td><select name="rate" size="1"> <option selected="selected" value="5">Excellent!</option> <option value="4">Very Good</option> <option value="3">Good</option> <option value="2">Fair</option> <option value="1">Poor</option> </select> <input name="submit" type="submit" value="Cast My Vote!" /></td>
</tr>
</tbody></table>
</td>
</tr>
</tbody></form></table>
<!--   End of HTML Code   --->Amazon.com has a variety of book on PHP <a href="http://www.amazon.com/exec/obidos/external-search/102-4705021-0991362?mode=books&amp;keyword=PHP&amp;Go=Go&amp;tag=newsourcemedi-20" target="_blank">Click    here to see the list of PHP books available.</a>]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/php-email-form-easy/feed/</wfw:commentRss>
		<slash:comments>56</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
