Part 01 – PHP GET Method

Sample PHP Form submission using GET Method

PostForm.php

<!DOCTYPE HTML>
<html>  
<title> PHP GET Method </title>
<head> Php Form Submission using Get Method  </head>
<body>
<form action="output_get.php" method="get">
<div>
<br><br>
Name   :    <input type="text" name="name"><br><br>
Class  :    <input type="text" name="class"><br><br>
Section:    <input type="text" name="section"><br><br>
Marks1 :    <input type="text" name="marks1"><br><br>
Marks2 :    <input type="text" name="marks2"><br><br>
Marks3 :    <input type="text" name="marks3"><br><br>
<input type="submit">
</div>
</form>
</body>
</html>

Output_get.php :

<?php
echo "Output";
echo  $_GET["name"];
echo "<br>";
echo  $_GET["class"];
echo "<br>";
echo  $_GET["section"];
echo "<br>";
echo  $_GET["marks1"];
echo "<br>";
echo  $_GET["marks2"];
echo "<br>";
echo  $_GET["marks3"];
?>

UI:-

Output:-

Leave a Reply

Your email address will not be published. Required fields are marked *