While building a registration form for my website, I encountered an issue with passing single element values into an array in CodeIgniter. The values are not being passed correctly, resulting in an error message about an empty alert. How can I resolve this problem?
$uname = $this->input->post('name');
$umobile = $this->input->post('mobile');
$udob = $this->input->post('dob');
$ugender = $this->input->post('gender');
$uage = $this->input->post('age');
// $uphoto = $_FILES['photo']['name'];
// $sphoto = $_FILES['sphoto']['name'];
$uphoto = "Data";
$sphoto = "Testing";
$uanuvacery = $this->input->post('anuvacery');
$sname = $this->input->post('sname');
$sshopnumber = $this->input->post('shopnumber');
$sgst = $this->input->post('sgst');
$deal = $this->input->post('deal');
$address = $this->input->post('address');
$dist = $this->input->post('dist');
$mturn = $this->input->post('mturn');
$data = array(
'uid' => '00',
'uname' => $uname,
'umobile' => $umobile,
'udob' => $udob,
'ugen' => $ugender,
'uprofile' => $uphoto,
'uanu' => $uanuvacery,
'sname' => $sname,
'sphone' => $sshopnumber,
'sgst' => $sgst,
'sdtype' => $deal,
'sphoto' => $sphoto,
'sturn' => $mturn,
'district' => $dist,
'uaddress' => $address,
'uage' => $uage
);