Welcome Guest, Not a member yet? Register   Sign In
retrieve multiple varibles from Input classs
#2

[eluser]Phil Sturgeon[/eluser]
You can use a for loop for that, but I would prefer to do it this way.

Code:
<label>Something: </label>
&lt;?php echo form_input('checkbox[]');?&gt;
<label>Something Else: </label>
&lt;?php echo form_input('checkbox[]');?&gt;
<label>Something again: </label>
&lt;?php echo form_input('checkbox[]');?&gt;

Then in your controller:

Code:
foreach($this->input->post('checkbox') as $value)
{
   echo $value;
}


Messages In This Thread
retrieve multiple varibles from Input classs - by El Forum - 09-22-2009, 05:29 AM
retrieve multiple varibles from Input classs - by El Forum - 09-22-2009, 06:16 AM



Theme © iAndrew 2016 - Forum software by © MyBB