/* */ Click to Join Live Class with Shankar sir Call 9798158723

$GET variable

Using get method, the data is carried out through the URL which is visible and is insecure when compared with post method. The data transferred through GET Method will be stored in the superglobal variable $_GET. This data submitted can be accessed in the form using GET Method by $_GET global variable.

Program for assigning $GET variable.
 <form name=“f1” method=“get” action="<?php echo
 Enter Roll<input type=“text” name=“t1”>
 <input type=“submit” value=“submit”>
 if ($_SERVER["REQUEST_METHOD"] == “get")
 // collect value of input field
 $name = $_GET[‘t1'];
 echo $name;