SlideShare a Scribd company logo
AIMS AND OBJECTIVES
Web Server Scripting
• Create a form in PHP
• Transfer data to another page using PHP
Web Server Scripting
Server Side Languages
PHP RECAP
<? php
Code
?>
Web Server Scripting
Server Side Languages
PHP RECAP
Variables
$x = 0; // sets up a variable
Web Server Scripting
Server Side Languages
Creating a form:
You do this in normal HTML code (but
still save it as a PHP page). Look at the
handout sheet for the form.
Web Server Scripting
Server Side Languages
When you submit the form:
<form method="post" action="result.php">
The server looks for result.php
All the text boxes full of information are
turned into php variables
Web Server Scripting
Server Side Languages
On result .php…
For example the text box called
first_name
Becomes $_POST['first_name'];
You can then use that variable.
Web Server Scripting
Server Side Languages
$first_name = $_POST['first_name'];
Stores the first_name in a semi-
permanent variable called $first_name.
You can then “echo” it or store it.
Web Server Scripting
Server Side Languages
On result.php
Echo $first_name.”<br>”;
Web Server Scripting
Server Side Languages
PHP – Forms
Passing Variables from a Form:
Welcome <?php echo $first_name; ?>!<br />
You are <?php echo $age; ?> years old.
Web Server Scripting
Server Side Languages
Use the handout to create form.php
And result.php which shows what has
been entered into the form.
Save in public_html
View at
Web Server Scripting
Extension:
Try using method=“GET” instead of
Method=“POST”
What is the difference?

More Related Content

PDF
CakePHP 3
rafaelfqf
 
PPTX
Php basics
Egerton University
 
PPTX
Web application using JSP
Kaml Sah
 
PDF
faster frontend development with textmate
Marc Tobias Kunisch
 
PDF
WooCommerce: Intro to PHP
Rodolfo Melogli
 
PPT
Wordpress install setup
Mohammed Nayeem
 
PDF
Thymeleaf Introduction
Anthony Chen
 
PDF
Introduction to thymeleaf
NexThoughts Technologies
 
CakePHP 3
rafaelfqf
 
Php basics
Egerton University
 
Web application using JSP
Kaml Sah
 
faster frontend development with textmate
Marc Tobias Kunisch
 
WooCommerce: Intro to PHP
Rodolfo Melogli
 
Wordpress install setup
Mohammed Nayeem
 
Thymeleaf Introduction
Anthony Chen
 
Introduction to thymeleaf
NexThoughts Technologies
 

What's hot (13)

PDF
Introducing thymeleaf
eiryu
 
ODP
PHP and PDFLib
Adam Culp
 
PPTX
Caching and invalidating with managed store
F K
 
PPT
Wonka.js introduction
Julián Ceballos
 
PPTX
Caching and invalidating with managed store
irfan1008
 
TXT
20170310 PHP goal pyramid for memorising
Sharon Liu
 
PDF
Ruby de Rails
Yuichiro MASUI
 
ODP
Javascript debugging
audiodog
 
PPT
Php1
mohamed yusuf
 
ODP
Sourcerer and Joomla! rev. 20130903
DouglasPickett
 
PPTX
HackU PHP and Node.js
souridatta
 
PPTX
Mule xml parsing
Muralidhar Gumma
 
PPTX
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
GreeceJS
 
Introducing thymeleaf
eiryu
 
PHP and PDFLib
Adam Culp
 
Caching and invalidating with managed store
F K
 
Wonka.js introduction
Julián Ceballos
 
Caching and invalidating with managed store
irfan1008
 
20170310 PHP goal pyramid for memorising
Sharon Liu
 
Ruby de Rails
Yuichiro MASUI
 
Javascript debugging
audiodog
 
Sourcerer and Joomla! rev. 20130903
DouglasPickett
 
HackU PHP and Node.js
souridatta
 
Mule xml parsing
Muralidhar Gumma
 
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
GreeceJS
 
Ad

Viewers also liked (8)

PPT
PHP - Introduction to PHP Forms
Vibrant Technologies & Computers
 
PPTX
Form Script
lotlot
 
PPT
Chapter 07 php forms handling
Dhani Ahmad
 
PPTX
3 php forms
hello8421
 
PPTX
Php Form
lotlot
 
PPT
Php forms
Anne Lee
 
ODP
Form Processing In Php
Harit Kothari
 
PDF
Login and Registration form using oop in php
herat university
 
PHP - Introduction to PHP Forms
Vibrant Technologies & Computers
 
Form Script
lotlot
 
Chapter 07 php forms handling
Dhani Ahmad
 
3 php forms
hello8421
 
Php Form
lotlot
 
Php forms
Anne Lee
 
Form Processing In Php
Harit Kothari
 
Login and Registration form using oop in php
herat university
 
Ad

Similar to Web server scripting - Using a form (20)

PPTX
Web Application Development using PHP Chapter 1
Mohd Harris Ahmad Jaal
 
PPT
10_introduction_php.ppt
GiyaShefin
 
PPT
10_introduction_php.ppt
MercyL2
 
PPT
introduction_php.ppt
ArunKumar313658
 
PPTX
introduction to php and its uses in daily
vishal choudhary
 
PPTX
Php technical presentation
dharmendra kumar dhakar
 
PPTX
PHP.pptx is the Best Explanation of ppts
AkhileshPansare
 
PPTX
INTRODUCTION to php.pptx
priyanshupanchal8
 
PDF
Lecture14-Introduction to PHP-coding.pdf
IotenergyWater
 
PPT
php 1
tumetr1
 
PPTX
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
anshkhurana01
 
PPT
PHP MySQL Workshop - facehook
Shashank Skills Academy
 
PPTX
1. introduction to php and variable
NurAliaAqilaMuhalis
 
PPTX
php (Hypertext Preprocessor)
Chandan Das
 
PPTX
PHP
Chandan Das
 
PDF
PHP in Web development and Applications.pdf
VinayVitekari
 
PPTX
PHP Hypertext Preprocessor
adeel990
 
PDF
Introduction to php
Anjan Banda
 
PPT
PHP - Introduction to PHP Fundamentals
Vibrant Technologies & Computers
 
Web Application Development using PHP Chapter 1
Mohd Harris Ahmad Jaal
 
10_introduction_php.ppt
GiyaShefin
 
10_introduction_php.ppt
MercyL2
 
introduction_php.ppt
ArunKumar313658
 
introduction to php and its uses in daily
vishal choudhary
 
Php technical presentation
dharmendra kumar dhakar
 
PHP.pptx is the Best Explanation of ppts
AkhileshPansare
 
INTRODUCTION to php.pptx
priyanshupanchal8
 
Lecture14-Introduction to PHP-coding.pdf
IotenergyWater
 
php 1
tumetr1
 
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
anshkhurana01
 
PHP MySQL Workshop - facehook
Shashank Skills Academy
 
1. introduction to php and variable
NurAliaAqilaMuhalis
 
php (Hypertext Preprocessor)
Chandan Das
 
PHP in Web development and Applications.pdf
VinayVitekari
 
PHP Hypertext Preprocessor
adeel990
 
Introduction to php
Anjan Banda
 
PHP - Introduction to PHP Fundamentals
Vibrant Technologies & Computers
 

Recently uploaded (20)

PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PPTX
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
PDF
Beyond Automation: The Role of IoT Sensor Integration in Next-Gen Industries
Rejig Digital
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
Architecture of the Future (09152021)
EdwardMeyman
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PPT
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
PDF
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PPTX
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
How to Build a Scalable Micro-Investing Platform in 2025 - A Founder’s Guide ...
Third Rock Techkno
 
Beyond Automation: The Role of IoT Sensor Integration in Next-Gen Industries
Rejig Digital
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
Architecture of the Future (09152021)
EdwardMeyman
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Software Development Methodologies in 2025
KodekX
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
BLW VOCATIONAL TRAINING SUMMER INTERNSHIP REPORT
codernjn73
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 

Web server scripting - Using a form

  • 1. AIMS AND OBJECTIVES Web Server Scripting • Create a form in PHP • Transfer data to another page using PHP
  • 2. Web Server Scripting Server Side Languages PHP RECAP <? php Code ?>
  • 3. Web Server Scripting Server Side Languages PHP RECAP Variables $x = 0; // sets up a variable
  • 4. Web Server Scripting Server Side Languages Creating a form: You do this in normal HTML code (but still save it as a PHP page). Look at the handout sheet for the form.
  • 5. Web Server Scripting Server Side Languages When you submit the form: <form method="post" action="result.php"> The server looks for result.php All the text boxes full of information are turned into php variables
  • 6. Web Server Scripting Server Side Languages On result .php… For example the text box called first_name Becomes $_POST['first_name']; You can then use that variable.
  • 7. Web Server Scripting Server Side Languages $first_name = $_POST['first_name']; Stores the first_name in a semi- permanent variable called $first_name. You can then “echo” it or store it.
  • 8. Web Server Scripting Server Side Languages On result.php Echo $first_name.”<br>”;
  • 9. Web Server Scripting Server Side Languages PHP – Forms Passing Variables from a Form: Welcome <?php echo $first_name; ?>!<br /> You are <?php echo $age; ?> years old.
  • 10. Web Server Scripting Server Side Languages Use the handout to create form.php And result.php which shows what has been entered into the form. Save in public_html View at
  • 11. Web Server Scripting Extension: Try using method=“GET” instead of Method=“POST” What is the difference?