ptmuldoon
11-25-2008, 04:30 PM
I have a form that creates an array of variables such as
<input type="hidden" name="id[]" value="'.$ID.'" />
When processing the data, what is the proper way to sanitize the input and keep the input as a array so that it can be used in a loop?
$ids = $_POST['id']; //Need to Sanitize
//$vbulletin->input->clean_array_gpc('p', $ids); This is incorrect?
foreach($ids as $id){
$value = $_POST['active'][$id]; //Need to Sanitize
//Do More Processing
}
<input type="hidden" name="id[]" value="'.$ID.'" />
When processing the data, what is the proper way to sanitize the input and keep the input as a array so that it can be used in a loop?
$ids = $_POST['id']; //Need to Sanitize
//$vbulletin->input->clean_array_gpc('p', $ids); This is incorrect?
foreach($ids as $id){
$value = $_POST['active'][$id]; //Need to Sanitize
//Do More Processing
}