Powered by Blogger.

If we have a form in which an inout field name is same as variable in query string when we submit the form then what value we will get


Q. If we have a form in which an input field name is the same as a variable in the query string
e.g.

query string : ?abc=15

hidden field :
 and when I submit the form than what value we will get either 15 or 20?

Ans. 20

$_GET['abc'] = 15;
$_POST['abc'] = 20;
$_REQUEST['abc'] = 20;
Since we are posting the form so $_GET will be avoided so, our ans will be 20

No comments