[eluser]The Revel[/eluser]
[quote author="Aken" date="1337925027"]Creating the drop down is correct. What does $groups look like after you retrieve it?[/quote]
Its an array, when I echo groups it simply says array, so its getting information assigned to it, just not the right info. I have a feeling I have to some how extract the groups[] array somehow but unfortunately I am not sure which way to go on that. I am assuming something along the lines of groups[$i] method.
Something along the lines of
Code:
$group = array($this->input->post('groups[0]'));
if (isset($this->input->post('groups[1]')))
{
array_push($group, $this->input->post('groups[1]'));
}
if (isset($this->input->post('groups[2]')))
{
array_push($group, $this->input->post('groups[2]'));
}
I have not tested this of course, will try it now and see if I am right.
[EDIT]
Well, that didn't work, neither did
Code:
$groups = array($this->input->post('groups[0]'));
if ($this->input->post('groups[1]'))
{
array_push($groups, $this->input->post('groups[1]'));
}
if ($this->input->post('groups[2]'))
{
array_push($groups, $this->input->post('groups[2]'));
}
(which I changed to since the first method is not possible as my IDE tells me it cant use a method return value)
Anyone have any idea how to make this work? I want the super admins to be able to create users with Multiple groups. Alternately I could use check boxes I guess, but fear I would run into the same problem.
[/EDIT]