So I'm editing one of my company's websites. I am not all too familiar with the way Zend works, but I haven't had good luck finding a solution to this problem.
We have two different sites, a staging website which I freely edit and test on, and a live version that the public can view. When I created a new controller/view, I used $_GET data to handle some forms. It worked as expected on the testing end, but the production end for some reason didn't work. After a bit of testing, I found out that the $_GET data is not actually being sent, and thus my script would boot me out (as it is designed to).
The URL looks sorta like this:
/admin/something/update?data=20
So I check the $_GET as I usually do:
if ( isset($_GET) && !empty($_GET["data"]) ) {
// do something
} else {
// redirect the user
}
It always redirects like it should if there is no $_GET data (and if data doesn't contain a value).
So I debug and find out that this is what $_GET looks like after I print_r and all I get is an empty array despite the URL clearly containing the $_GET data.
It might be my limited knowledge of Zend handles GET and POST data (because I pretty much keep my edits to old-school PHP), so any light to this would be fantastic. Thanks.