header


header

s.no Teacher_Name
1 Carmen

Get methods Example:

<?php error_reporting(0); if( $_GET["name"] || $_GET["age"] ) { echo "Welcome ". $_GET['name']. "<br />"; echo "Your age ". $_GET['age']; exit(); } ?> <html> <body> <form action="<?php $_PHP_SELF ?>" method="GET"> Name: <input type="text" name="name" /> age:<input type="text" name="age" /> <input type="submit" /> </form> </body> </html>

output:

OUTPUT :

grid
Welcome suhani Your age 12

Post methods Example:

<?php error_reporting(0); if( $_POST["name"] || $_POST["weight"] ) { echo "Welcome ". $_POST['name']. "<br />"; echo "Your weight ". $_POST['weight']; exit(); } ?> <html> <body> <form action = "<?php $_PHP_SELF ?>" method = "POST"> Name: <input type = "text" name = "name" /> Weight: <input type = "text" name = "weight" /> <input type = "submit" /> </form> </body> </html>

output:

grid
Welcome Aashish kumar Your weight 55