> -----Original Message-----
> From: Carlos Fernando Scheidecker Antunes 
> [mailto:[EMAIL PROTECTED]] 

> function SearchOrders() {
>     global $Orders;
>     global $HTTP_POST_VARS;
>  $index = count($HTTP_POST_VARS);
>  for($i=1; $i <= $index; $i++) {
The trouble is here ^^^^.  You should be test for the max
Number of possible checkboxes, and not the number checked.  If 3,4,5 are checked, then 
$index is 3, bu thte varaiables will have names like 
PED$3, PED$4, PEF$5 and your code will stop at 3.

>      if (isset($HTTP_POST_VARS["PED$i"]))
>      $Orders[] = $HTTP_POST_VARS["PED$i"];
>  }
>  $index = count($Orders);
>  return $index;
Why not name the checkboxes as arrays like:
<input type="checkbox" name="PED[]" value="18191"> 
<input type="checkbox" name="PED[]" value="18192"> 

Then in php, PED[0] is the first *checked* value (so it could be the 5th checkbox).  
Test with is_array to see if anything is check at all.

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

Reply via email to