I think this is simple.very. but i think i am missing something. I have a link:
website.com/page?variable=value
when i use $_GET["variable"]
i get the value, but when i use $_POST["variable"]
, i dont get the value?
Please Help.
I think this is simple.very. but i think i am missing something. I have a link:
website.com/page?variable=value
when i use $_GET["variable"]
i get the value, but when i use $_POST["variable"]
, i dont get the value?
Please Help.
This is normal behaviour.
$_GET
is populated with data from the URL's query string (which is taken from the request's headers).
$_POST
is populated with data from the request's body.
If you want to read data from the URL's query string, use $_GET
.