Articles → PHP → Get And Post In PHP

Get And Post In PHP






Software Requirement




  1. XAMPP is installed on your machine
  2. Any text editor like Notepad

Technical Knowledge




  1. Basics about PHP
  2. Client-server model
  3. What is the HTTP protocol?

What Is The Difference Between Get And Post?












  1. Get
  2. 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>




Picture showing the output of Get and Post in PHP
Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, November 12, 2014

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250