need loop help

From: Date: Tue, 03 Oct 2006 21:48:01 +0000
Subject: need loop help
Groups: php.general 
Request: Send a blank email to php-general+get-242587@lists.php.net to get a copy of this message
hi all. i am trying to modify some old code and struggling a bit with this one: // returns an array of the names in the form post $fields = $_SESSION['case']->getComplaintKeys(); // here is the array returned Array ( [0] => eligibility [1] => payment [2] => service [3] => document [4] => licensing [5] => source [6] => date [7] => contact [8] => description [9] => status ) for ($j = 0; $j < count($fields); $j++) { if (${$fields[$j]} == 'on') ${$fields[$j]} = 1; if (is_null(${$fields[$j]})) ${$fields[$j]} = 0; $data[$fields[$j]] = ${$fields[$j]}; } The problem I am having is that the code is now on a more secure server with register_globals off (and I don't want to turn that on). I am not sure how to get the POST data sorted out using this method. Hope it is clear what I mean. Thanks, Charles

« previous php.general (#242587) next »