I’ve just created a new plugin, following the tutorial with the command
bin/plugin devtools new-plugin. My goal is to read the GET parameters given with the URL and the output the result on the page.
Example: When I type
www.example.com/testplugin?name=Bobfirstname.lastname@example.org in my browser, I want to read the values. Normally I can do that with
$_GET['email']. But the $_GET variable only has one value:
My plugin subscribes to the
onPageContentRaw main event after checking the route, as shown in the tutorial. I simply changed one line to see if the values are present:
$e['page']->setRawContent("Dump of _GET: ".print_r($_GET, true) . " " . $content);
Can anybody help me to understand, what I’m doing wrong? I thougt is, that $_GET and $_POST are global in every PHP script.
Thank you very much.