Tags
PHP
Asked 3 years ago
13 Jul 2021
Views 223
Frances

Frances posted

What is $_ GET and $_ POST in PHP ?

What is $_ GET and $_ POST in PHP ?
How to use $_GET and $_POST in PHP ?
jaydeep

jaydeep
answered Jul 18 '21 00:00

in the html form have method GET and POST , PUT etc.. so in php we can get the value passed html form to the php can get by $_GET and $_POST

$_GET


<form method="get">
<input name="action"  type="text" value="update" />
</form>
 

another hand in php side you can get the value by $_GET['action']

<?php 
print_r($_GET);
?>


$_POST


<form method="post">
<input name="action"  type="text" value="update" />
</form>
 

another hand in php side you can get the value by $_POST['action']

<?php 
print_r($_POST);
?>


Post Answer