<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=PHP-and-MySQL%2FC4%2FSending-Email-Part-1%2FEnglish</id>
		<title>PHP-and-MySQL/C4/Sending-Email-Part-1/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=PHP-and-MySQL%2FC4%2FSending-Email-Part-1%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Sending-Email-Part-1/English&amp;action=history"/>
		<updated>2026-04-06T02:24:11Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Sending-Email-Part-1/English&amp;diff=876&amp;oldid=prev</id>
		<title>Pravin1389: moved PHP-and-MySQL/C4/Sending-Email-(Part 1)/English to PHP-and-MySQL/C4/Sending-Email-Part-1/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Sending-Email-Part-1/English&amp;diff=876&amp;oldid=prev"/>
				<updated>2012-12-01T15:19:07Z</updated>
		
		<summary type="html">&lt;p&gt;moved &lt;a href=&quot;/index.php/PHP-and-MySQL/C4/Sending-Email-(Part_1)/English&quot; class=&quot;mw-redirect&quot; title=&quot;PHP-and-MySQL/C4/Sending-Email-(Part 1)/English&quot;&gt;PHP-and-MySQL/C4/Sending-Email-(Part 1)/English&lt;/a&gt; to &lt;a href=&quot;/index.php/PHP-and-MySQL/C4/Sending-Email-Part-1/English&quot; title=&quot;PHP-and-MySQL/C4/Sending-Email-Part-1/English&quot;&gt;PHP-and-MySQL/C4/Sending-Email-Part-1/English&lt;/a&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='1' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:19, 1 December 2012&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan='2' style='text-align: center;'&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Pravin1389</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Sending-Email-Part-1/English&amp;diff=577&amp;oldid=prev</id>
		<title>Chandrika: Created page with '{| border=1 !Time !Narration |- |0:00 |Hello and welcome.  Today I will teach you how to create an email script particularly when you are registering a user onto a website.  |- |…'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=PHP-and-MySQL/C4/Sending-Email-Part-1/English&amp;diff=577&amp;oldid=prev"/>
				<updated>2012-11-29T06:57:32Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;{| border=1 !Time !Narration |- |0:00 |Hello and welcome.  Today I will teach you how to create an email script particularly when you are registering a user onto a website.  |- |…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| border=1&lt;br /&gt;
!Time&lt;br /&gt;
!Narration&lt;br /&gt;
|-&lt;br /&gt;
|0:00&lt;br /&gt;
|Hello and welcome.  Today I will teach you how to create an email script particularly when you are registering a user onto a website. &lt;br /&gt;
|-&lt;br /&gt;
|0:12&lt;br /&gt;
|How do you send them an email confirming that they have registered.  I will do that partly by creating a script - a &amp;quot;Send me an email&amp;quot; script. &lt;br /&gt;
|-&lt;br /&gt;
|0:24&lt;br /&gt;
|This will be in an HTML form in which you can write a subject and a message and send to a specified address. &lt;br /&gt;
|-&lt;br /&gt;
|0:34&lt;br /&gt;
|So, we will create an address variable. &lt;br /&gt;
|-&lt;br /&gt;
|0:39&lt;br /&gt;
|I will type my &amp;quot;hotmail&amp;quot; address here.&lt;br /&gt;
|-&lt;br /&gt;
|0:48&lt;br /&gt;
|You can see when I open up my current &amp;quot;hotmail&amp;quot; page and click on &amp;quot;Inbox&amp;quot;, there are no emails here from me.&lt;br /&gt;
|-&lt;br /&gt;
|0:55&lt;br /&gt;
|There are no new emails at the moment. &lt;br /&gt;
|-&lt;br /&gt;
|1:05&lt;br /&gt;
|So This is the address in my address variable. I will rename the variable as &amp;quot;to&amp;quot; instead.&lt;br /&gt;
|-&lt;br /&gt;
|1:13&lt;br /&gt;
|We will use the mail function to send this out.&lt;br /&gt;
|-&lt;br /&gt;
|1:17&lt;br /&gt;
|We will have the from and subject in here.&lt;br /&gt;
|-&lt;br /&gt;
|1:21&lt;br /&gt;
|We will have a standard subject which says &amp;quot;Email from PHPAcademy&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|1:32&lt;br /&gt;
|Next we need an HTML form that will submit.  I will create a self submission one. &lt;br /&gt;
|-&lt;br /&gt;
|1:39&lt;br /&gt;
|So lets put some html code here. I will have a form here which will submit to this page with &amp;quot;send me an email dot php&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|1:54&lt;br /&gt;
|The method is going to be POST. &lt;br /&gt;
|-&lt;br /&gt;
|1:59&lt;br /&gt;
|We will end our form here.&lt;br /&gt;
|-&lt;br /&gt;
|2:02&lt;br /&gt;
|The user can type in whatever they want to send to the email address that is specified here.&lt;br /&gt;
|-&lt;br /&gt;
|2:10&lt;br /&gt;
|Obviously you can take this into account. When creating a form, you could say you want to send to this particular address.  &lt;br /&gt;
|-&lt;br /&gt;
|2:18&lt;br /&gt;
|This one will just be &amp;quot;send me an email&amp;quot; script - the email that you want to include in one of your website. &lt;br /&gt;
|-&lt;br /&gt;
|2:27&lt;br /&gt;
|Now we will have a &amp;quot;text&amp;quot; input. &lt;br /&gt;
|-&lt;br /&gt;
|2:31&lt;br /&gt;
|This will be the name of the person sending me the email.&lt;br /&gt;
|-&lt;br /&gt;
|2:34&lt;br /&gt;
|So you have type &amp;quot;text&amp;quot; whose name is &amp;quot;name&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|2:39&lt;br /&gt;
|We'll have &amp;quot;max length&amp;quot; equal 20 for now.&lt;br /&gt;
|-&lt;br /&gt;
|2:45&lt;br /&gt;
|Underneath this we will create a text area. &lt;br /&gt;
|-&lt;br /&gt;
|2:49&lt;br /&gt;
|So I will type &amp;quot;textarea&amp;quot; and end it like that.&lt;br /&gt;
|-&lt;br /&gt;
|2:53&lt;br /&gt;
|Then we will name it as &amp;quot;message&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|2:59&lt;br /&gt;
|We put a paragraph beginning and a paragraph ending here &lt;br /&gt;
|-&lt;br /&gt;
|3:04&lt;br /&gt;
|And down here we will create a submit button whose value equals &amp;quot;Send&amp;quot;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|3:14&lt;br /&gt;
|Or.... &amp;quot;Send me this&amp;quot;, okay?&lt;br /&gt;
|-&lt;br /&gt;
|3:17&lt;br /&gt;
|So if you come to our page and choose this page here &lt;br /&gt;
|-&lt;br /&gt;
|3:21&lt;br /&gt;
|this is the space for the name and this is the space for the message.&lt;br /&gt;
|-&lt;br /&gt;
|3:25&lt;br /&gt;
|So let me just put &amp;quot;Name:&amp;quot; in here and &amp;quot;Message:&amp;quot; in here. &lt;br /&gt;
|-&lt;br /&gt;
|3:31&lt;br /&gt;
|And this will look much better now.  We have our name box and our message box. &lt;br /&gt;
|-&lt;br /&gt;
|3:38&lt;br /&gt;
|And when we click this button, the email will send.&lt;br /&gt;
|-&lt;br /&gt;
|3:44&lt;br /&gt;
|Okay so first of all inside our php code we need to check whether the submit button has been pressed.&lt;br /&gt;
|-&lt;br /&gt;
|3:53&lt;br /&gt;
|For that we have our &amp;quot;if&amp;quot; statement here in parenthesis and our curly brackets for our block if the condition is TRUE. &lt;br /&gt;
|-&lt;br /&gt;
|4:01&lt;br /&gt;
|The condition will be inside these parenthesis. &lt;br /&gt;
|-&lt;br /&gt;
|4:05&lt;br /&gt;
|The condition will be the post variable of the &amp;quot;submit&amp;quot; button.&lt;br /&gt;
|-&lt;br /&gt;
|4:15&lt;br /&gt;
|As long as the submit button has a value.... a spelling mistake....&lt;br /&gt;
|-&lt;br /&gt;
|4:19&lt;br /&gt;
|So long as the submit button has been pressed, this will contain a value and that value is &amp;quot;Send me this&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|4:30&lt;br /&gt;
|That would just mean that the form has been submitted because the button has been pressed.&lt;br /&gt;
|-&lt;br /&gt;
|4:37&lt;br /&gt;
|So inside here the first thing we need to do is get the data from the form. &lt;br /&gt;
|-&lt;br /&gt;
|4:44&lt;br /&gt;
|And that is the name of the person sending the email by submitting the form.&lt;br /&gt;
|-&lt;br /&gt;
|4:49&lt;br /&gt;
|And their name is contained within this form here - sorry this field here called &amp;quot;name&amp;quot;.&lt;br /&gt;
|-&lt;br /&gt;
|4:56&lt;br /&gt;
|Also we have the message so we can easily duplicate this variable structure and say message in there.&lt;br /&gt;
|-&lt;br /&gt;
|5:08&lt;br /&gt;
|To test this out I'll say echo name. &lt;br /&gt;
|-&lt;br /&gt;
|5:12&lt;br /&gt;
|And I'll concatenate the message into that. &lt;br /&gt;
|-&lt;br /&gt;
|5:17&lt;br /&gt;
|Lets just test this out.  Here I'll type &amp;quot;Alex&amp;quot;. &lt;br /&gt;
|-&lt;br /&gt;
|5:21&lt;br /&gt;
|And here I will type &amp;quot;Hi there!&amp;quot; &lt;br /&gt;
|-&lt;br /&gt;
|5:23&lt;br /&gt;
|Click &amp;quot;Send me this&amp;quot; and we get &amp;quot;Alex&amp;quot; and &amp;quot;Hi there!&amp;quot; up there. &lt;br /&gt;
|-&lt;br /&gt;
|5:28&lt;br /&gt;
|Ok so, we know that the form data has been submitted correctly.&lt;br /&gt;
|-&lt;br /&gt;
|5:33&lt;br /&gt;
|In the next part of this video we will learn how to validate this and eventually send this mail to the user specified in this email-id here. &lt;br /&gt;
|-&lt;br /&gt;
|5:42&lt;br /&gt;
|So join me in the next part. Bye for now.&lt;br /&gt;
|-&lt;br /&gt;
|5:45&lt;br /&gt;
|This is Evan Varkey dubbing for the Spoken Tutorial Project.&lt;/div&gt;</summary>
		<author><name>Chandrika</name></author>	</entry>

	</feed>