need loop help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux