在视野中
$male=array('id'=>'2','name'=>'gen');
$female=array('id'=>'3','name'=>'gen');
echo "<label>Gender : <label>"." ".form_radio($male)."Male".form_radio($female)."Female"."<br>";
我怎样才能在控制器中得到这个?
我的控制器
public function index()
{
$this->load->view('include/header');
$this->load->helper('form');
$this->load->view('data');
$this->load->view('include/footer');
}
public function formHandler()
{
$data = array('name'=>$_POST['name'],'age'=>$_POST['age'],'gen'=>$_POST['gen'],'add'=>$_POST['add']);
$this->load->library('form_validation');
echo $data['name'];
//echo $data['age'];
//echo $data['add'];
}