Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.



Get Started Now!

$_GET and $_POST Variable in PHP

Programming Scripting Languages
  • $_GET and $_POST is generally used in the forms to transfer data from one file to another file. Both the variables are kind of same except when we need to keep our data secure we use $_POST and generally in the form we use $_POST.

We will see the explanation by a example:

Form.html

Testform.php

In this form we have used “get” method and we will see the output below:

As we can see we have used the method “get” in the form and in the output page of testform.php we can see the input given, also with that in the URL box we can see the details which we have provided in the form.html.

If we use “post” method in the form.html we will see the difference below:

As we can see in the URL box there is no such details provided which we can see while using “post” method.

Joydeep M
Latest posts by Joydeep M (see all)
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x