Welcome Guest, Not a member yet? Register   Sign In
How to Edit data? Simple question
#6

(This post was last modified: 01-07-2019, 05:38 AM by InsiteFX.)

Then you will need to check if the username is empty or not.

PHP Code:
$data = array(
 
   if (! empty($this->input->post('username')))
 
   {
 
       'person_name'=> $this->input->post('username'),
 
   }
 
   'person_d' => $this->input->post('d'),
 
   'person_department' => $this->input->post('department'),
 
   'city_id' => $this->input->post('address')
); 

Other wise you are passing the person_name to the database as empty.

A better way of doing this would be to fill in all of the form fields on an edit
then allow them to change the fields.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
How to Edit data? Simple question - by Razzer - 01-06-2019, 07:52 AM
RE: How to Edit data? Simple question - by Razzer - 01-06-2019, 10:39 AM
RE: How to Edit data? Simple question - by Razzer - 01-06-2019, 09:32 PM
RE: How to Edit data? Simple question - by InsiteFX - 01-07-2019, 05:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB