I have a checkbox array (report_type_id[]) that is getting looped through in a foreach loop.

	foreach ($_POST['report_type_id'] as $key => $value) {
		// DO STUFF				
}

After moving to a new server this no longer works...but it works if I turn register_globals = On and change the code to:

	foreach ($report_type_id as $key => $value) {
		// DO STUFF				
}

So my question is how do I access the checkbox array with register_globals = Off?

    if its an older php version, try $HTTP_POST_VARS but is there any error message when you use $_POST? does it say undefined variable?

      PHP Version 5.0.3

      when I do a print_r, such as:

      print_r($_POST['report_type_id']);
      echo "<BR><BR>";
      print_r($report_type_id);
      

      It outputs the following:

      Array

      Array ( [0] => 2 [1] => 13 )

        Write a Reply...