Articles → PHP → Get And Post In PHP
Get And Post In PHP
Software Requirement
- XAMPP is installed on your machine
- Any text editor like Notepad
Technical Knowledge
- Basics about PHP
- Client-server model
- What is the HTTP protocol?
What Is The Difference Between Get And Post?
- Get
- Post
Get
<html><body>
<?php
echo ($_GET["mode"]);
?></body></html>
Post
<html><head><title></title></head><body>
<?php
if (!empty($_POST["name1"]))
{
echo ($_POST["name1"]);
}
?><form method="post">
Name:<input type="text" name = "name1"><br><input type="Submit" value="Submit"></form></body></html>
Click to Enlarge