5
I have run into another stumpper.
I pass several vars in an array via GET.
I know the array is comming through.
On my PHP page I have:
Quote:
// GET Vars
$Users = $_GET['users'];
// Build Objects
$crit_user = new CriteriaCompo();
// loop over it and print array elements
foreach ($Users as $a)
{
echo $a;
$addfilter = new Criteria('ticket.UID', $a, '=');
$crit_user->add($addfilter, 'OR');
}
echo
;
echo $crit_user->render();
The echo is there for debugging. When I pass this url
Quote:
er_ticket.php?userall=3&users%5B%5D=1&users%5B%5D=2&users%5B%5D=3&users%5B%5D=4
I get this result:
Quote:
1234
(ticket.UID = 4 OR ticket.UID = 4 OR ticket.UID = 4 OR ticket.UID = 4)
I can see that my vars (1,2,3,4) are being passed via GET. The array is being run through by the foreach loop... but no joy on the CriteriaCampo.
I am very stumpped. Any help is appreciated.
Thanks,