Locked lesson.
About this lesson
Exercise files
Download this lesson’s related exercise files.
Form Handling - GET vs POST.docx59.1 KB Form Handling - GET vs POST - Solution.docx
59.5 KB
Quick reference
Form Handling - GET vs POST
Forms are used on a website to allow site visitors to interact with you in some way.
When to use
Whenever you want to add a form to a webpage.
Instructions
Here's the basic HTML template I used in the video:
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Online Form</h1>
<form action="form.php" method="post">
Name: <input type="text" name="name"><br/><br/>
<input type="submit">
</form>
</body>
</html>
Hints & tips
- Forms send data from web pages
- Forms use POST and GET as methods
- POST variables look like $_POST["field_name"];
- GET variables look like $_GET["field_name"];
Lesson notes are only available for subscribers.