<?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; html tell a friend</title>
	<atom:link href="http://readytousesolutions.com/phpblog/tag/html-tell-a-friend/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, 02 Sep 2010 05:23:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PHP Tutorial : Tell a friend script</title>
		<link>http://readytousesolutions.com/phpblog/php-tutorial-tell-a-friend-script/</link>
		<comments>http://readytousesolutions.com/phpblog/php-tutorial-tell-a-friend-script/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 22:09:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Usefull PHP]]></category>
		<category><![CDATA[html tell a friend]]></category>
		<category><![CDATA[php tell a friend]]></category>
		<category><![CDATA[tell a friend]]></category>
		<category><![CDATA[tell a friend form]]></category>
		<category><![CDATA[tell a friend script]]></category>

		<guid isPermaLink="false">http://www.crivionweb.com/phpblog/?p=47</guid>
		<description><![CDATA[Hi, In this php tutorial I&#8217;ll teach you how to create a simple tell a friend script. Basically, it will use what you learned in the send email with a contact form script, but in this case we&#8217;ll choose the &#8230; <a href="http://readytousesolutions.com/phpblog/php-tutorial-tell-a-friend-script/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Hi,</p>
<p>In this php tutorial I&#8217;ll teach you how to create a simple tell a friend script. Basically, it will use what you learned in the send email with a contact form script, but in this case we&#8217;ll choose the destination and also the &#8220;from:&#8221; field which we&#8217;ll setup on php mail() function headers.</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 email address : <span class="htmlFormTag">&lt;input type=<span class="htmlAttributeValue">&quot;text&quot;</span> name=<span class="htmlAttributeValue">&quot;yemail&quot;</span>&gt;</span><span class="htmlOtherTag">&lt;br/&gt;</span>
Your friend&#039;s email address : <span class="htmlFormTag">&lt;input type=<span class="htmlAttributeValue">&quot;text&quot;</span> name=<span class="htmlAttributeValue">&quot;femail&quot;</span>&gt;</span><span class="htmlOtherTag">&lt;br/&gt;</span>
Your message :
<span class="htmlFormTag">&lt;textarea name=<span class="htmlAttributeValue">&quot;text&quot;</span>&gt;</span>Hey look what nice website I found
<span class="htmlOtherTag">&lt;?=$_SERVER[&#039;SERVER_NAME&#039;];?&gt;</span>
<span class="htmlFormTag">&lt;/textarea&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;Tell a friend&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>tell a friend form was completed and sended
</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="phpKeyword">
if<span class="phpOperator">(</span></span><span class="phpScriptVar">$_POST</span><span class="phpOperator">[</span><span class="phpString">'ye<span class="phpFunction">mail</span>'</span><span class="phpOperator">]</span> <span class="phpOperator"><span class="phpOperator">=</span>=</span> <span class="phpString">"" || $_POST['femail'] == ""</span> <span class="phpOperator">|</span><span class="phpOperator">|</span> <span class="phpScriptVar">$_POST</span><span class="phpOperator">[</span><span class="phpString">'text'</span><span class="phpOperator">]</span> <span class="phpOperator"><span class="phpOperator">=</span>=</span> <span class="phpString">""</span><span class="phpOperator">)</span> <span class="phpOperator">{</span>
<span class="htmlText">
print </span><span class="phpString">"All fields are mandatory"</span><span class="phpText">;</span>
<span class="phpKeyword"><span class="phpOperator">}</span><span class="htmlText">else</span><span class="phpOperator">{</span></span>
$to <span class="phpOperator">=</span> <span class="phpScriptVar">$_POST</span><span class="phpOperator">[</span><span class="phpString">'fe<span class="phpFunction">mail</span>'</span><span class="phpOperator">]</span><span class="phpText">;</span>
$from <span class="phpOperator">=</span> <span class="phpString">"From <span class="phpOperator">:</span> <span class="phpScriptVar">$_POST</span><span class="phpOperator">[</span><span class="htmlText">ye</span><span class="phpFunction">mail</span><span class="phpOperator">]</span>"</span><span class="phpText">;</span>
$message <span class="phpOperator">=</span> <span class="phpScriptVar">$_POST</span><span class="phpOperator">[</span><span class="phpString">'text'</span><span class="phpOperator">]</span><span class="phpText">;</span>
$subject <span class="phpOperator">=</span> <span class="phpString">"Your friend tells u"</span><span class="phpText">;</span>
<span class="phpFunction">mail</span><span class="phpOperator">(</span>$to, $subject , $message, $from<span class="phpOperator">)</span><span class="phpText">;</span>
<span class="phpOperator">}</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-tell-a-friend-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
