SlideShare a Scribd company logo
Chapter 2 Sending form details via emails
PHP Sending E-mails PHP allows you to send e-mails directly from a script. The PHP mail() Function The PHP mail() function is used to send emails from inside a script.
Syntax Note:  For the mail functions to be available, PHP requires an installed and working email system. The program to be used is defined by the configuration settings in the php.ini file. Read more in our  PHP Mail reference .
PHP Simple E-Mail This can be used to check if the server is setup correctly.
Sending Emails - 1 1 st  check that SMTP is installed. Through the window component wizard. Highlight IIS and click on details.  If the SMTP is ticked then it is installed if not you need to install it.
Sending Emails - 2 Overview:  In this task you will create a message sent page that will transfer the data to an email. The page that obtains the email data is the contact.php page. You will add a table with no borders and a form to send the information to the message_sent.php page.
Sending Emails - 3 Open the generic_template.php and save it as message_sent.php Looks like this Make it look like this, with link to index.php.
Sending Emails – 4 Add the php code as shown.
Sending Emails - 5 Open contact.php and change it to look like this. Details on the next slide.
Sending Emails - 6 Position the insertion point below the image caption, and choose Insert  > Form > Form to create a new form.  Without moving the insertion point, choose Insert > Table, providing  the following settings. Click OK.  Rows: 4  Columns: 2  Width: 95 Percent  Border: 0  Cell Padding: 3  Cell Spacing: 0
Sending Emails - 7 Select the <table> tag using the tag selector, and use the Property inspector to change its bgcolor (background color) attribute to #eeeeee, which is a light gray.  In the right column of the table insert the following;  Two text fields called, emailAddress subject One text area called body A Submit button  In the first three cells of the left column, enter the following text:  Your Email Address  Subject  Message Body
Sending Emails - 8 Select the text area and give it the following  specifications; Char Width :55 Num Lines as 6, and Wrap as Virtual.  Select the form in the tag selector, in the Property inspector set:  Name = frm_message  Action = messageSent.php  Method = POST  Insert a Heading 2 element above the table that reads, “Send Us a Message.”
Client-Side Form Validation Open contact.php Select the submit button In the behaviours panels add a behaviour as shown.
Client-Side Form Validation In the Validate form dialog as shown set the fields as emailAddress: Required as an email Subject: Required as anything Body: Required as anything. Resulting with the dialog shown below.
Client-Side Form Validation Notice the behaviours panel should look like this when you highlight the submit button. Save and test the validation.
Lab 2 - 1 Overview: Create a html form with client-side validation Create an action page to send an email. Your overview instructions located in the next section of the book: lab section.  Your two pages will look like the following 2 slides.
Sendemail.php
Sendemail_action.php
Sample of email sent
Lab 2 - 1 Open server_side_scripting site Open tourtemplate.php.  Change to Split view.  In the Design view pane, click on the link Or email us.  In the Property inspector change the link to link to sendemail.php. Hit the enter key after putting in the link (if you don’t hit enter, the value will not be saved).  Save tourtemplate.php.
Lab 2 - 2 Create an Email Form Page  Save tourtemplate.php as sendemail.php.  Replace the generic left heading with Send Email.  Replace the generic Left Side Text with the text “Fill in the values in the form and submit the form to send an email to us. Thank you for your interest.”  Create a new form below the text.  Name the form email.  Set the action to sendemail_action.php.  Make sure that the Method is Post.
Lab 2 - 3 Create a table inside the form with 2 columns and 4 rows.  Type in the labels as shown in the table below.  From Address  Subject  Message Body  In the second column,  first row put a text field and name it from With a width of 30 and max of 50.  In the second row,  put a text field and name it subject with the same width and max.  In the third row,  put a textarea control and name it message  with a width of 40 and 10 rows.  In the last row,  first column put a submit button control  with a label of Send Email.
Lab 2 – 4 Create Action Page  Create a new page from tourtemplate.php  name : sendemail_action.php.  Note that the email link now points to sendemail.php.  Change the left section title to Email Complete and the text to “Thank you for your email.”  In bindings, create 3 new Request variables:  from  subject  message
Lab 2 - 5 In Code view make space between the heading and the text. Type the following php code.
Lab 2 - 6 Replace your email address with mine. The From address would normally be hard coded with the site’s email address.  Save the page.  Preview the sendemail.php page. Fill out the form and submit it using your email address as the sender.
Lab 2 - 7 Client Side Validation  Return to Dreamweaver and the sendemail.php page.  Select the Submit button.  In the Behaviours panel, click Add Behaviour and choose Validate Form.  Make all of the fields are required and validate the email address.  Save the page.  Preview sendemail.php.  Check that validation is working by trying to submit an empty form and also try an invalid email address format.
Ad

More Related Content

What's hot (18)

Html forms
Html formsHtml forms
Html forms
Er. Nawaraj Bhandari
 
Ado Presentation
Ado PresentationAdo Presentation
Ado Presentation
Rebecca Peltz
 
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
MahmoudOHassouna
 
Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web
MahmoudOHassouna
 
MS Office and Oracle Lab Manual
MS Office and Oracle Lab Manual MS Office and Oracle Lab Manual
MS Office and Oracle Lab Manual
RajaKrishnan M
 
Creating and Processing Web Forms
Creating and Processing Web FormsCreating and Processing Web Forms
Creating and Processing Web Forms
Nicole Ryan
 
WritingSamplesCombined
WritingSamplesCombinedWritingSamplesCombined
WritingSamplesCombined
Janet Henjum
 
Murach: ASP.NET Core MVC, How To Work With Razor Views
Murach: ASP.NET Core MVC, How To Work With Razor ViewsMurach: ASP.NET Core MVC, How To Work With Razor Views
Murach: ASP.NET Core MVC, How To Work With Razor Views
MahmoudOHassouna
 
Microsoft excel 2007
Microsoft excel 2007Microsoft excel 2007
Microsoft excel 2007
Arvin Tomias
 
Ms word, access, powerpoint and internet
Ms word, access, powerpoint and internet Ms word, access, powerpoint and internet
Ms word, access, powerpoint and internet
RajaKrishnan M
 
Editor
EditorEditor
Editor
Sampsell11
 
1and1Mail Quickstart Guide - Contact List Management
1and1Mail Quickstart Guide - Contact List Management1and1Mail Quickstart Guide - Contact List Management
1and1Mail Quickstart Guide - Contact List Management
YeteSoft
 
Visual basics Express Project
Visual basics Express ProjectVisual basics Express Project
Visual basics Express Project
Iftikhar Ahmed
 
HTML
HTML HTML
HTML
Emertxe Information Technologies Pvt Ltd
 
Rr email not working on windows 10 email app how to fix
Rr email not working on windows 10 email app how to fixRr email not working on windows 10 email app how to fix
Rr email not working on windows 10 email app how to fix
Rachel Cooper
 
JavaScript event handling assignment
JavaScript  event handling assignment JavaScript  event handling assignment
JavaScript event handling assignment
Soham Sengupta
 
RapidResponse Autoresponder Quick Start Guide Pictorial
RapidResponse Autoresponder Quick Start Guide Pictorial RapidResponse Autoresponder Quick Start Guide Pictorial
RapidResponse Autoresponder Quick Start Guide Pictorial
Phil Eugene
 
Html forms
Html formsHtml forms
Html forms
M Vishnuvardhan Reddy
 
Ado Presentation
Ado PresentationAdo Presentation
Ado Presentation
Rebecca Peltz
 
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
MahmoudOHassouna
 
Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web Murach : How to develop a single-page MVC web
Murach : How to develop a single-page MVC web
MahmoudOHassouna
 
MS Office and Oracle Lab Manual
MS Office and Oracle Lab Manual MS Office and Oracle Lab Manual
MS Office and Oracle Lab Manual
RajaKrishnan M
 
Creating and Processing Web Forms
Creating and Processing Web FormsCreating and Processing Web Forms
Creating and Processing Web Forms
Nicole Ryan
 
WritingSamplesCombined
WritingSamplesCombinedWritingSamplesCombined
WritingSamplesCombined
Janet Henjum
 
Murach: ASP.NET Core MVC, How To Work With Razor Views
Murach: ASP.NET Core MVC, How To Work With Razor ViewsMurach: ASP.NET Core MVC, How To Work With Razor Views
Murach: ASP.NET Core MVC, How To Work With Razor Views
MahmoudOHassouna
 
Microsoft excel 2007
Microsoft excel 2007Microsoft excel 2007
Microsoft excel 2007
Arvin Tomias
 
Ms word, access, powerpoint and internet
Ms word, access, powerpoint and internet Ms word, access, powerpoint and internet
Ms word, access, powerpoint and internet
RajaKrishnan M
 
1and1Mail Quickstart Guide - Contact List Management
1and1Mail Quickstart Guide - Contact List Management1and1Mail Quickstart Guide - Contact List Management
1and1Mail Quickstart Guide - Contact List Management
YeteSoft
 
Visual basics Express Project
Visual basics Express ProjectVisual basics Express Project
Visual basics Express Project
Iftikhar Ahmed
 
Rr email not working on windows 10 email app how to fix
Rr email not working on windows 10 email app how to fixRr email not working on windows 10 email app how to fix
Rr email not working on windows 10 email app how to fix
Rachel Cooper
 
JavaScript event handling assignment
JavaScript  event handling assignment JavaScript  event handling assignment
JavaScript event handling assignment
Soham Sengupta
 
RapidResponse Autoresponder Quick Start Guide Pictorial
RapidResponse Autoresponder Quick Start Guide Pictorial RapidResponse Autoresponder Quick Start Guide Pictorial
RapidResponse Autoresponder Quick Start Guide Pictorial
Phil Eugene
 

Similar to Dynamic Web Pages Ch 2 V1.0 (20)

Exto Help Desk for Magento 2 (user guide)
Exto Help Desk for Magento 2 (user guide)Exto Help Desk for Magento 2 (user guide)
Exto Help Desk for Magento 2 (user guide)
Exto.io
 
How to create and an email in husky link
How to create and an email in husky linkHow to create and an email in husky link
How to create and an email in husky link
Michigan Technological University Alumni Association
 
Foundation and PathwaysCOS10020 Creating Web Application.docx
Foundation and PathwaysCOS10020 Creating Web Application.docxFoundation and PathwaysCOS10020 Creating Web Application.docx
Foundation and PathwaysCOS10020 Creating Web Application.docx
hanneloremccaffery
 
Php forms and validations by naveen kumar veligeti
Php forms and validations by naveen kumar veligetiPhp forms and validations by naveen kumar veligeti
Php forms and validations by naveen kumar veligeti
Naveen Kumar Veligeti
 
Prep 2-booklet-2nd-term-2016-2017
Prep 2-booklet-2nd-term-2016-2017Prep 2-booklet-2nd-term-2016-2017
Prep 2-booklet-2nd-term-2016-2017
khawagah
 
Laravel mail example how to send an email using markdown template in laravel 8
Laravel mail example how to send an email using markdown template in laravel 8Laravel mail example how to send an email using markdown template in laravel 8
Laravel mail example how to send an email using markdown template in laravel 8
Katy Slemon
 
Jazz
JazzJazz
Jazz
GEBS Reporting
 
How to add a new blog post in WordPress.pdf
How to add a new blog post in WordPress.pdfHow to add a new blog post in WordPress.pdf
How to add a new blog post in WordPress.pdf
StephieJohn
 
Guide to send your email
Guide to send your emailGuide to send your email
Guide to send your email
Right Service
 
Shelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docx
Shelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docxShelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docx
Shelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docx
maoanderton
 
Part 1; CSS and placing images on the page: The following files are located i...
Part 1; CSS and placing images on the page: The following files are located i...Part 1; CSS and placing images on the page: The following files are located i...
Part 1; CSS and placing images on the page: The following files are located i...
hwbloom15
 
Web forms and html lecture Number 4
Web forms and html lecture Number 4Web forms and html lecture Number 4
Web forms and html lecture Number 4
Mudasir Syed
 
txtQuizMaker
txtQuizMakertxtQuizMaker
txtQuizMaker
Vishal Sancheti
 
Action Mailer
Action MailerAction Mailer
Action Mailer
SHC
 
mail merge tutorial.docx
mail merge tutorial.docxmail merge tutorial.docx
mail merge tutorial.docx
ExamQuestionare
 
Empowerment Technologies - Module 4
Empowerment Technologies - Module 4Empowerment Technologies - Module 4
Empowerment Technologies - Module 4
Jesus Rances
 
Visualbasic tutorial
Visualbasic tutorialVisualbasic tutorial
Visualbasic tutorial
Andi Simanjuntak
 
I am having trouble writing the individual files for part 1, which i.pdf
I am having trouble writing the individual files for part 1, which i.pdfI am having trouble writing the individual files for part 1, which i.pdf
I am having trouble writing the individual files for part 1, which i.pdf
mallik3000
 
A. Lab # BSBA BIS245A-7B. Lab 7 of 7 Database Navigation.docx
A. Lab #  BSBA BIS245A-7B. Lab 7 of 7  Database Navigation.docxA. Lab #  BSBA BIS245A-7B. Lab 7 of 7  Database Navigation.docx
A. Lab # BSBA BIS245A-7B. Lab 7 of 7 Database Navigation.docx
ransayo
 
Ms office practical
Ms office practicalMs office practical
Ms office practical
SureshBabuMannarColl
 
Exto Help Desk for Magento 2 (user guide)
Exto Help Desk for Magento 2 (user guide)Exto Help Desk for Magento 2 (user guide)
Exto Help Desk for Magento 2 (user guide)
Exto.io
 
Foundation and PathwaysCOS10020 Creating Web Application.docx
Foundation and PathwaysCOS10020 Creating Web Application.docxFoundation and PathwaysCOS10020 Creating Web Application.docx
Foundation and PathwaysCOS10020 Creating Web Application.docx
hanneloremccaffery
 
Php forms and validations by naveen kumar veligeti
Php forms and validations by naveen kumar veligetiPhp forms and validations by naveen kumar veligeti
Php forms and validations by naveen kumar veligeti
Naveen Kumar Veligeti
 
Prep 2-booklet-2nd-term-2016-2017
Prep 2-booklet-2nd-term-2016-2017Prep 2-booklet-2nd-term-2016-2017
Prep 2-booklet-2nd-term-2016-2017
khawagah
 
Laravel mail example how to send an email using markdown template in laravel 8
Laravel mail example how to send an email using markdown template in laravel 8Laravel mail example how to send an email using markdown template in laravel 8
Laravel mail example how to send an email using markdown template in laravel 8
Katy Slemon
 
How to add a new blog post in WordPress.pdf
How to add a new blog post in WordPress.pdfHow to add a new blog post in WordPress.pdf
How to add a new blog post in WordPress.pdf
StephieJohn
 
Guide to send your email
Guide to send your emailGuide to send your email
Guide to send your email
Right Service
 
Shelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docx
Shelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docxShelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docx
Shelly Cashman Excel 2013 Chapter 10 SAM Project 1aShelly .docx
maoanderton
 
Part 1; CSS and placing images on the page: The following files are located i...
Part 1; CSS and placing images on the page: The following files are located i...Part 1; CSS and placing images on the page: The following files are located i...
Part 1; CSS and placing images on the page: The following files are located i...
hwbloom15
 
Web forms and html lecture Number 4
Web forms and html lecture Number 4Web forms and html lecture Number 4
Web forms and html lecture Number 4
Mudasir Syed
 
Action Mailer
Action MailerAction Mailer
Action Mailer
SHC
 
mail merge tutorial.docx
mail merge tutorial.docxmail merge tutorial.docx
mail merge tutorial.docx
ExamQuestionare
 
Empowerment Technologies - Module 4
Empowerment Technologies - Module 4Empowerment Technologies - Module 4
Empowerment Technologies - Module 4
Jesus Rances
 
Visualbasic tutorial
Visualbasic tutorialVisualbasic tutorial
Visualbasic tutorial
Andi Simanjuntak
 
I am having trouble writing the individual files for part 1, which i.pdf
I am having trouble writing the individual files for part 1, which i.pdfI am having trouble writing the individual files for part 1, which i.pdf
I am having trouble writing the individual files for part 1, which i.pdf
mallik3000
 
A. Lab # BSBA BIS245A-7B. Lab 7 of 7 Database Navigation.docx
A. Lab #  BSBA BIS245A-7B. Lab 7 of 7  Database Navigation.docxA. Lab #  BSBA BIS245A-7B. Lab 7 of 7  Database Navigation.docx
A. Lab # BSBA BIS245A-7B. Lab 7 of 7 Database Navigation.docx
ransayo
 
Ad

More from Cathie101 (20)

Page Layout 2010
Page Layout 2010Page Layout 2010
Page Layout 2010
Cathie101
 
Css 2010
Css 2010Css 2010
Css 2010
Cathie101
 
Xhtml 2010
Xhtml 2010Xhtml 2010
Xhtml 2010
Cathie101
 
Dynamic Web Pages Ch 8 V1.0
Dynamic Web Pages Ch 8 V1.0Dynamic Web Pages Ch 8 V1.0
Dynamic Web Pages Ch 8 V1.0
Cathie101
 
Dynamic Web Pages Ch 6 V1.0
Dynamic Web Pages Ch 6 V1.0Dynamic Web Pages Ch 6 V1.0
Dynamic Web Pages Ch 6 V1.0
Cathie101
 
Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0
Cathie101
 
Dynamic Web Pages Ch 9 V1.0
Dynamic Web Pages Ch 9 V1.0Dynamic Web Pages Ch 9 V1.0
Dynamic Web Pages Ch 9 V1.0
Cathie101
 
Dynamic Web Pages Ch 7 V1.0
Dynamic Web Pages Ch 7 V1.0Dynamic Web Pages Ch 7 V1.0
Dynamic Web Pages Ch 7 V1.0
Cathie101
 
Dynamic Web Pages Ch 5 V1.0
Dynamic Web Pages Ch 5 V1.0Dynamic Web Pages Ch 5 V1.0
Dynamic Web Pages Ch 5 V1.0
Cathie101
 
Dynamic Web Pages Ch 4 V1.0
Dynamic Web Pages Ch 4 V1.0Dynamic Web Pages Ch 4 V1.0
Dynamic Web Pages Ch 4 V1.0
Cathie101
 
Dynamic Web Pages Ch 3 V1.0
Dynamic Web Pages Ch 3 V1.0Dynamic Web Pages Ch 3 V1.0
Dynamic Web Pages Ch 3 V1.0
Cathie101
 
Dynamic Web Pages 2009v2.1
Dynamic Web Pages 2009v2.1Dynamic Web Pages 2009v2.1
Dynamic Web Pages 2009v2.1
Cathie101
 
Database Fdd
Database FddDatabase Fdd
Database Fdd
Cathie101
 
Sql All Tuts 2009
Sql All Tuts 2009Sql All Tuts 2009
Sql All Tuts 2009
Cathie101
 
Database Fdd
Database FddDatabase Fdd
Database Fdd
Cathie101
 
Database Er
Database ErDatabase Er
Database Er
Cathie101
 
Database Design E R 2009
Database Design E R 2009Database Design E R 2009
Database Design E R 2009
Cathie101
 
Database Design Fdd 2009
Database Design Fdd 2009Database Design Fdd 2009
Database Design Fdd 2009
Cathie101
 
Database Design E R 2009
Database Design E R 2009Database Design E R 2009
Database Design E R 2009
Cathie101
 
Overall Computer Systems 2nd Year 2009
Overall Computer Systems 2nd Year 2009Overall Computer Systems 2nd Year 2009
Overall Computer Systems 2nd Year 2009
Cathie101
 
Page Layout 2010
Page Layout 2010Page Layout 2010
Page Layout 2010
Cathie101
 
Css 2010
Css 2010Css 2010
Css 2010
Cathie101
 
Xhtml 2010
Xhtml 2010Xhtml 2010
Xhtml 2010
Cathie101
 
Dynamic Web Pages Ch 8 V1.0
Dynamic Web Pages Ch 8 V1.0Dynamic Web Pages Ch 8 V1.0
Dynamic Web Pages Ch 8 V1.0
Cathie101
 
Dynamic Web Pages Ch 6 V1.0
Dynamic Web Pages Ch 6 V1.0Dynamic Web Pages Ch 6 V1.0
Dynamic Web Pages Ch 6 V1.0
Cathie101
 
Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0Dynamic Web Pages Ch 1 V1.0
Dynamic Web Pages Ch 1 V1.0
Cathie101
 
Dynamic Web Pages Ch 9 V1.0
Dynamic Web Pages Ch 9 V1.0Dynamic Web Pages Ch 9 V1.0
Dynamic Web Pages Ch 9 V1.0
Cathie101
 
Dynamic Web Pages Ch 7 V1.0
Dynamic Web Pages Ch 7 V1.0Dynamic Web Pages Ch 7 V1.0
Dynamic Web Pages Ch 7 V1.0
Cathie101
 
Dynamic Web Pages Ch 5 V1.0
Dynamic Web Pages Ch 5 V1.0Dynamic Web Pages Ch 5 V1.0
Dynamic Web Pages Ch 5 V1.0
Cathie101
 
Dynamic Web Pages Ch 4 V1.0
Dynamic Web Pages Ch 4 V1.0Dynamic Web Pages Ch 4 V1.0
Dynamic Web Pages Ch 4 V1.0
Cathie101
 
Dynamic Web Pages Ch 3 V1.0
Dynamic Web Pages Ch 3 V1.0Dynamic Web Pages Ch 3 V1.0
Dynamic Web Pages Ch 3 V1.0
Cathie101
 
Dynamic Web Pages 2009v2.1
Dynamic Web Pages 2009v2.1Dynamic Web Pages 2009v2.1
Dynamic Web Pages 2009v2.1
Cathie101
 
Database Fdd
Database FddDatabase Fdd
Database Fdd
Cathie101
 
Sql All Tuts 2009
Sql All Tuts 2009Sql All Tuts 2009
Sql All Tuts 2009
Cathie101
 
Database Fdd
Database FddDatabase Fdd
Database Fdd
Cathie101
 
Database Er
Database ErDatabase Er
Database Er
Cathie101
 
Database Design E R 2009
Database Design E R 2009Database Design E R 2009
Database Design E R 2009
Cathie101
 
Database Design Fdd 2009
Database Design Fdd 2009Database Design Fdd 2009
Database Design Fdd 2009
Cathie101
 
Database Design E R 2009
Database Design E R 2009Database Design E R 2009
Database Design E R 2009
Cathie101
 
Overall Computer Systems 2nd Year 2009
Overall Computer Systems 2nd Year 2009Overall Computer Systems 2nd Year 2009
Overall Computer Systems 2nd Year 2009
Cathie101
 
Ad

Recently uploaded (20)

Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Massive Power Outage Hits Spain, Portugal, and France: Causes, Impact, and On...
Aqusag Technologies
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager APIUiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPath Community Berlin: Orchestrator API, Swagger, and Test Manager API
UiPathCommunity
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Big Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur MorganBig Data Analytics Quick Research Guide by Arthur Morgan
Big Data Analytics Quick Research Guide by Arthur Morgan
Arthur Morgan
 
Role of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered ManufacturingRole of Data Annotation Services in AI-Powered Manufacturing
Role of Data Annotation Services in AI-Powered Manufacturing
Andrew Leo
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.Greenhouse_Monitoring_Presentation.pptx.
Greenhouse_Monitoring_Presentation.pptx.
hpbmnnxrvb
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
TrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business ConsultingTrsLabs - Fintech Product & Business Consulting
TrsLabs - Fintech Product & Business Consulting
Trs Labs
 

Dynamic Web Pages Ch 2 V1.0

  • 1. Chapter 2 Sending form details via emails
  • 2. PHP Sending E-mails PHP allows you to send e-mails directly from a script. The PHP mail() Function The PHP mail() function is used to send emails from inside a script.
  • 3. Syntax Note: For the mail functions to be available, PHP requires an installed and working email system. The program to be used is defined by the configuration settings in the php.ini file. Read more in our PHP Mail reference .
  • 4. PHP Simple E-Mail This can be used to check if the server is setup correctly.
  • 5. Sending Emails - 1 1 st check that SMTP is installed. Through the window component wizard. Highlight IIS and click on details. If the SMTP is ticked then it is installed if not you need to install it.
  • 6. Sending Emails - 2 Overview: In this task you will create a message sent page that will transfer the data to an email. The page that obtains the email data is the contact.php page. You will add a table with no borders and a form to send the information to the message_sent.php page.
  • 7. Sending Emails - 3 Open the generic_template.php and save it as message_sent.php Looks like this Make it look like this, with link to index.php.
  • 8. Sending Emails – 4 Add the php code as shown.
  • 9. Sending Emails - 5 Open contact.php and change it to look like this. Details on the next slide.
  • 10. Sending Emails - 6 Position the insertion point below the image caption, and choose Insert > Form > Form to create a new form. Without moving the insertion point, choose Insert > Table, providing the following settings. Click OK. Rows: 4 Columns: 2 Width: 95 Percent Border: 0 Cell Padding: 3 Cell Spacing: 0
  • 11. Sending Emails - 7 Select the <table> tag using the tag selector, and use the Property inspector to change its bgcolor (background color) attribute to #eeeeee, which is a light gray. In the right column of the table insert the following; Two text fields called, emailAddress subject One text area called body A Submit button In the first three cells of the left column, enter the following text: Your Email Address Subject Message Body
  • 12. Sending Emails - 8 Select the text area and give it the following specifications; Char Width :55 Num Lines as 6, and Wrap as Virtual. Select the form in the tag selector, in the Property inspector set: Name = frm_message Action = messageSent.php Method = POST Insert a Heading 2 element above the table that reads, “Send Us a Message.”
  • 13. Client-Side Form Validation Open contact.php Select the submit button In the behaviours panels add a behaviour as shown.
  • 14. Client-Side Form Validation In the Validate form dialog as shown set the fields as emailAddress: Required as an email Subject: Required as anything Body: Required as anything. Resulting with the dialog shown below.
  • 15. Client-Side Form Validation Notice the behaviours panel should look like this when you highlight the submit button. Save and test the validation.
  • 16. Lab 2 - 1 Overview: Create a html form with client-side validation Create an action page to send an email. Your overview instructions located in the next section of the book: lab section. Your two pages will look like the following 2 slides.
  • 20. Lab 2 - 1 Open server_side_scripting site Open tourtemplate.php. Change to Split view. In the Design view pane, click on the link Or email us. In the Property inspector change the link to link to sendemail.php. Hit the enter key after putting in the link (if you don’t hit enter, the value will not be saved). Save tourtemplate.php.
  • 21. Lab 2 - 2 Create an Email Form Page Save tourtemplate.php as sendemail.php. Replace the generic left heading with Send Email. Replace the generic Left Side Text with the text “Fill in the values in the form and submit the form to send an email to us. Thank you for your interest.” Create a new form below the text. Name the form email. Set the action to sendemail_action.php. Make sure that the Method is Post.
  • 22. Lab 2 - 3 Create a table inside the form with 2 columns and 4 rows. Type in the labels as shown in the table below. From Address Subject Message Body In the second column, first row put a text field and name it from With a width of 30 and max of 50. In the second row, put a text field and name it subject with the same width and max. In the third row, put a textarea control and name it message with a width of 40 and 10 rows. In the last row, first column put a submit button control with a label of Send Email.
  • 23. Lab 2 – 4 Create Action Page Create a new page from tourtemplate.php name : sendemail_action.php. Note that the email link now points to sendemail.php. Change the left section title to Email Complete and the text to “Thank you for your email.” In bindings, create 3 new Request variables: from subject message
  • 24. Lab 2 - 5 In Code view make space between the heading and the text. Type the following php code.
  • 25. Lab 2 - 6 Replace your email address with mine. The From address would normally be hard coded with the site’s email address. Save the page. Preview the sendemail.php page. Fill out the form and submit it using your email address as the sender.
  • 26. Lab 2 - 7 Client Side Validation Return to Dreamweaver and the sendemail.php page. Select the Submit button. In the Behaviours panel, click Add Behaviour and choose Validate Form. Make all of the fields are required and validate the email address. Save the page. Preview sendemail.php. Check that validation is working by trying to submit an empty form and also try an invalid email address format.