SlideShare une entreprise Scribd logo
1  sur  8
PHP FORMS
PHP
•                             HTML
                                            PHP
              HTML
    <html>
    <body>
    <form action="register.php" method="POST">
               input type="text" name="name" />
                input type="text" name="age" />
    <input type="submit" />
    </form>
    </body>
    </html>
•            HTML                          text field)
     submit button)                      submit
    register.php
register.php"
<html>
<body>
                 php echo $_POST["name"]; ?>.<br />
          php echo $_POST["age"]; ?>
  body>
</html>




               POST                POST["name"]
 POST["age"]                          GET             GET
      POST
GET
•         GET                      HTTP GET
       GET                                    URL
        HTTP GET
                                  GET
    <html>
    <body>
    <form action="register.php" method="GET">
              input type="text" name="name" />
               input type="text" name="age" />
    <input type="submit" />
    </form>
    </body>
    </html>
URL                                      register.php"
• www.phpstreet.com/register.php?name=pong&age=28

•

•    register.php                                     GET


•                  php echo $_GET["name"]; ?><br />
•           php echo $_GET["age"]; ?>

•                            GET                URL

                                   URL
                       URL
REQUEST
•      REQUEST
                   GET, $_POST              COOKIE

•

           php echo $_REQUEST["name"]; ?>.<br />
    php echo $_REQUEST["age"]; ?>
POST
•            POST                                HTTP POST
            HTTP GET


                                            POST
    <html>
    <body>
    <form action="register.php" method="POST">
              input type="text" name="name" />
               input type="text" name="age" />
    <input type="submit" />
    </form>
    </body>
    </html>
register.php
                   POST

•              php echo $_POST["name"]; ?><br />
•       php echo $_POST["age"]; ?>

•           POST

Contenu connexe

Tendances

Php Form
Php FormPhp Form
Php Form
lotlot
 
Site Mocikut
Site MocikutSite Mocikut
Site Mocikut
erick
 
Html basics 10 form
Html basics 10 formHtml basics 10 form
Html basics 10 form
H K
 

Tendances (20)

4.1 html lec 4
4.1 html lec 44.1 html lec 4
4.1 html lec 4
 
Web Development Course: PHP lecture 2
Web Development Course: PHP lecture 2Web Development Course: PHP lecture 2
Web Development Course: PHP lecture 2
 
Php Form
Php FormPhp Form
Php Form
 
Php workshop L03 superglobals
Php workshop L03 superglobalsPhp workshop L03 superglobals
Php workshop L03 superglobals
 
Php workshop L04 database
Php workshop L04 databasePhp workshop L04 database
Php workshop L04 database
 
Html and Xhtml
Html and XhtmlHtml and Xhtml
Html and Xhtml
 
FYBSC IT Web Programming Unit III Document Object
FYBSC IT Web Programming Unit III  Document ObjectFYBSC IT Web Programming Unit III  Document Object
FYBSC IT Web Programming Unit III Document Object
 
DIWE - Coding HTML for Basic Web Designing
DIWE - Coding HTML for Basic Web DesigningDIWE - Coding HTML for Basic Web Designing
DIWE - Coding HTML for Basic Web Designing
 
1.1 html lec 1
1.1 html lec 11.1 html lec 1
1.1 html lec 1
 
Html 5 Forms
Html 5 FormsHtml 5 Forms
Html 5 Forms
 
HTML Web design english & sinhala mix note
HTML Web design english & sinhala mix noteHTML Web design english & sinhala mix note
HTML Web design english & sinhala mix note
 
Web page concept final ppt
Web page concept  final pptWeb page concept  final ppt
Web page concept final ppt
 
Javascript
JavascriptJavascript
Javascript
 
FYBSC IT Web Programming Unit II Html 5 Tables, Forms and Media
FYBSC IT Web Programming Unit II  Html 5 Tables, Forms and MediaFYBSC IT Web Programming Unit II  Html 5 Tables, Forms and Media
FYBSC IT Web Programming Unit II Html 5 Tables, Forms and Media
 
Pp checker
Pp checkerPp checker
Pp checker
 
Practical PHP by example Jan Leth-Kjaer
Practical PHP by example   Jan Leth-KjaerPractical PHP by example   Jan Leth-Kjaer
Practical PHP by example Jan Leth-Kjaer
 
HTML5 Web Forms
HTML5 Web FormsHTML5 Web Forms
HTML5 Web Forms
 
Html5 appunti.0
Html5   appunti.0Html5   appunti.0
Html5 appunti.0
 
Site Mocikut
Site MocikutSite Mocikut
Site Mocikut
 
Html basics 10 form
Html basics 10 formHtml basics 10 form
Html basics 10 form
 

En vedette

Deliver Files With PHP
Deliver Files With PHPDeliver Files With PHP
Deliver Files With PHP
Thomas Weinert
 
Geek Austin PHP Class - Session 4
Geek Austin PHP Class - Session 4Geek Austin PHP Class - Session 4
Geek Austin PHP Class - Session 4
jimbojsb
 
S.G.Balaji Resume
S.G.Balaji ResumeS.G.Balaji Resume
S.G.Balaji Resume
Balaji Sg
 
Memphis php html form processing with php
Memphis php   html form processing with phpMemphis php   html form processing with php
Memphis php html form processing with php
Joe Ferguson
 
Creating And Consuming Web Services In Php 5
Creating And Consuming Web Services In Php 5Creating And Consuming Web Services In Php 5
Creating And Consuming Web Services In Php 5
Michael Girouard
 
Creating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login SystemCreating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login System
Azharul Haque Shohan
 

En vedette (20)

Php forms
Php formsPhp forms
Php forms
 
Deliver Files With PHP
Deliver Files With PHPDeliver Files With PHP
Deliver Files With PHP
 
Script login form php
Script login form phpScript login form php
Script login form php
 
Using arrays with PHP for forms and storing information
Using arrays with PHP for forms and storing informationUsing arrays with PHP for forms and storing information
Using arrays with PHP for forms and storing information
 
03 the htm_lforms
03 the htm_lforms03 the htm_lforms
03 the htm_lforms
 
Geek Austin PHP Class - Session 4
Geek Austin PHP Class - Session 4Geek Austin PHP Class - Session 4
Geek Austin PHP Class - Session 4
 
S.G.Balaji Resume
S.G.Balaji ResumeS.G.Balaji Resume
S.G.Balaji Resume
 
Ns3
Ns3Ns3
Ns3
 
PHP - Introduction to PHP Cookies and Sessions
PHP - Introduction to PHP Cookies and SessionsPHP - Introduction to PHP Cookies and Sessions
PHP - Introduction to PHP Cookies and Sessions
 
Memphis php html form processing with php
Memphis php   html form processing with phpMemphis php   html form processing with php
Memphis php html form processing with php
 
PHP Cookies and Sessions
PHP Cookies and SessionsPHP Cookies and Sessions
PHP Cookies and Sessions
 
PHP Files: An Introduction
PHP Files: An IntroductionPHP Files: An Introduction
PHP Files: An Introduction
 
PHP Cookies, Sessions and Authentication
PHP Cookies, Sessions and AuthenticationPHP Cookies, Sessions and Authentication
PHP Cookies, Sessions and Authentication
 
Network Simulation NS3
Network Simulation NS3Network Simulation NS3
Network Simulation NS3
 
ns-3: History and Future
ns-3: History and Futurens-3: History and Future
ns-3: History and Future
 
Creating And Consuming Web Services In Php 5
Creating And Consuming Web Services In Php 5Creating And Consuming Web Services In Php 5
Creating And Consuming Web Services In Php 5
 
Creating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login SystemCreating a Simple PHP and MySQL-Based Login System
Creating a Simple PHP and MySQL-Based Login System
 
Building Topology in NS3
Building Topology in NS3Building Topology in NS3
Building Topology in NS3
 
Tutorial ns 3-tutorial-slides
Tutorial ns 3-tutorial-slidesTutorial ns 3-tutorial-slides
Tutorial ns 3-tutorial-slides
 
ns-3 Tutorial
ns-3 Tutorialns-3 Tutorial
ns-3 Tutorial
 

Similaire à 3 php forms

PHP an intro -1
PHP an intro -1PHP an intro -1
PHP an intro -1
Kanchilug
 

Similaire à 3 php forms (20)

PHP 1
PHP 1PHP 1
PHP 1
 
BITM3730 10-24.pptx
BITM3730 10-24.pptxBITM3730 10-24.pptx
BITM3730 10-24.pptx
 
Introduction to php web programming - get and post
Introduction to php  web programming - get and postIntroduction to php  web programming - get and post
Introduction to php web programming - get and post
 
BITM3730 10-25.pptx
BITM3730 10-25.pptxBITM3730 10-25.pptx
BITM3730 10-25.pptx
 
PHP-04-Forms.ppt
PHP-04-Forms.pptPHP-04-Forms.ppt
PHP-04-Forms.ppt
 
PHP-Part4
PHP-Part4PHP-Part4
PHP-Part4
 
Introduction to web development - HTML 5
Introduction to web development - HTML 5Introduction to web development - HTML 5
Introduction to web development - HTML 5
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
 
PHP an intro -1
PHP an intro -1PHP an intro -1
PHP an intro -1
 
Html , php, mysql intro
Html , php, mysql introHtml , php, mysql intro
Html , php, mysql intro
 
Class 6 - PHP Web Programming
Class 6 - PHP Web ProgrammingClass 6 - PHP Web Programming
Class 6 - PHP Web Programming
 
Login and Registration form using oop in php
Login and Registration form using oop in phpLogin and Registration form using oop in php
Login and Registration form using oop in php
 
Zencoding cheatsheet, ayuda Memoria
Zencoding cheatsheet, ayuda MemoriaZencoding cheatsheet, ayuda Memoria
Zencoding cheatsheet, ayuda Memoria
 
Zen Coding Cheat Sheet
Zen Coding Cheat SheetZen Coding Cheat Sheet
Zen Coding Cheat Sheet
 
I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)I Don't Care About Security (And Neither Should You)
I Don't Care About Security (And Neither Should You)
 
Lecture7 form processing by okello erick
Lecture7 form processing by okello erickLecture7 form processing by okello erick
Lecture7 form processing by okello erick
 
GET and POST in PHP
GET and POST in PHPGET and POST in PHP
GET and POST in PHP
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Multipart form data
Multipart form dataMultipart form data
Multipart form data
 
Quick beginner to Lower-Advanced guide/tutorial in PHP
Quick beginner to Lower-Advanced guide/tutorial in PHPQuick beginner to Lower-Advanced guide/tutorial in PHP
Quick beginner to Lower-Advanced guide/tutorial in PHP
 

Dernier

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Dernier (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

3 php forms

  • 2. PHP • HTML PHP HTML <html> <body> <form action="register.php" method="POST"> input type="text" name="name" /> input type="text" name="age" /> <input type="submit" /> </form> </body> </html> • HTML text field) submit button) submit register.php
  • 3. register.php" <html> <body> php echo $_POST["name"]; ?>.<br /> php echo $_POST["age"]; ?> body> </html> POST POST["name"] POST["age"] GET GET POST
  • 4. GET • GET HTTP GET GET URL HTTP GET GET <html> <body> <form action="register.php" method="GET"> input type="text" name="name" /> input type="text" name="age" /> <input type="submit" /> </form> </body> </html>
  • 5. URL register.php" • www.phpstreet.com/register.php?name=pong&age=28 • • register.php GET • php echo $_GET["name"]; ?><br /> • php echo $_GET["age"]; ?> • GET URL URL URL
  • 6. REQUEST • REQUEST GET, $_POST COOKIE • php echo $_REQUEST["name"]; ?>.<br /> php echo $_REQUEST["age"]; ?>
  • 7. POST • POST HTTP POST HTTP GET POST <html> <body> <form action="register.php" method="POST"> input type="text" name="name" /> input type="text" name="age" /> <input type="submit" /> </form> </body> </html>
  • 8. register.php POST • php echo $_POST["name"]; ?><br /> • php echo $_POST["age"]; ?> • POST