3 php forms

1,977 views
1,914 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,977
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

3 php forms

  1. 1. PHP FORMS
  2. 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. 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. 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. 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. 6. REQUEST• REQUEST GET, $_POST COOKIE• php echo $_REQUEST["name"]; ?>.<br /> php echo $_REQUEST["age"]; ?>
  7. 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. 8. register.php POST• php echo $_POST["name"]; ?><br />• php echo $_POST["age"]; ?>• POST

×