Hi there!
In this tutorial's processRequest
method:
...
switch ($request_method){
case 'get':
$data = $_GET;
break;
case 'post':
$data = $_POST;
break;
...
looks like $_GET variables are ignored when $_POST happens (at least this happening in my test setup - not the same script but idea is similar).
My test case:
//URL: `example.com/?iam=get`
//HTML:
<form action="?iam=get" method="post">
<input type="text" name="textinput" />
<input type="submit" />
</form>
Printing $data
on request gives me:
Array ( [iam] => get ) //Opening the page without submit
Array ( [textinput] => angry fabrik ) //Submitting the form
(Because of form's action, url isn't changing but $_GET variable iam
is missing.)
I'm often using $_GET and $_POST variables mixed (AJAX requests, handling forms, etc.) but now i'm sure about i'm overlooking something. Where's my misunderstanding?
Thanks in advance, fabrik