View Single Post
  #2  
Old 08-25-2013, 03:04 PM
IntoRain's Avatar
IntoRain IntoRain is offline
Moderator
 
Join Date: Jul 2013
Location: Portugal
Posts: 461
Gender: Female
Credits: 22,918
IntoRain is on a distinguished road
Default

I tried it out and "Hacking Attempt!" does appear when I try to use an array to store the values.

If there's no way to prevent it, you can always create a checkbox for each adoptables. Then do a cycle (after submitting) to verify which checkboxes were checked and had PetID values on them then push those values to an array and well, do your group thing.

Like:

PHP Code:
//for each pet, add a checkbox
$checkbox = new CheckBox("name""Postname{$index}"value)
{
$index}++ //doing this, for each pet you'll have Postname1, Postname2, Postname3 etc.. value can be pet ID?

//after submitting/post
for($index 0$index numPets$index++)
{
    if(
$mysidia->input->post("Postname{$index}") != NULL//value not null means ID was stored/checked
{
     
$petID $mysidia->input->post("Postname{$index}");
     
//do whatever
}

__________________


asp.net stole my soul.
Reply With Quote