After reading this tutorial I ran into this $data = $_POST; or $data = $_GET
and then this is executed $data['data']; So I am assuming its either $_POST['data'] or $_GET['data']. This is in the context of a rest api http request.
My question is, where the heck did that 'data' element come from? Is that some sort of native post or get element? Testing its out with var_dump doesn’t reveal anything.
“Data” is a key of the value you have sent to server. For example you can send GET request to your script like this
http://localhost/myscript.php?data=mysuperdatawillbehereOr you can send post request by creating form which will be send POST request to your script or by using cURL or you can install some plugin for your browser to emulate requests. I use poster for firefox