I've got this problem with php, and I guess the worst part is that it's working fine on my dev environment (php v5.4) but breaks on the test/live site on the webserver (php v5.2).
So when I var_dump my $_POST["formData"] I get an array that looks like this:
array(42) {
[0] => array(2) {
["name"] => string(2) "id";
["value"] => string(4) "3972";
}
[1] => array(2) {
["name"] => string(2) "action";
["value"] => string(4) "edit";
}
...
}
To separate this, I use this (or some variation of this):
for($i=0;$i<count($_POST["formData"]);$i++) {
$data[$_POST["formData"][$i]["name"]] = $_POST["formData"][$i]["value"];
}
So I end up being able to access everything with:
foreach($data as $key => $value) {
echo $key . " = " . $value . "<br />";
}
which outputs:
id = 3972
action = edit
...
So, again, this works just fine on my dev server, but breaks on the live site. I've looked around here and found a lot of examples, but it seems a lot of them are using examples that aren't working quite the same.
What's causing this? Is it some setting? Is it a change between the two versions? I've tried a couple other things but none of them have worked and it's kinda a pain testing on the testing server (uploading files one at a time...yay...). Any easy solution or do I have to rebuild my script?