title: Codeigniter You must use the “set” method to update an entry 5
body: <p>i will do all the whay but not work .</p>
  
  <p><em>Model</em></p>
  
  <pre><code>public function edit(){  
            $id = $this-&gt;uri-&gt;segment(3);
            $template['page'] = "careerdetails/edit-career";
            $template['page_title'] = "Edit Careers Details";
           // $template['data'] = $this-&gt;career_model-&gt;get_careerdetails();
            $template['data'] = $this-&gt;career_model-&gt;show_career_id($id);
            $this-&gt;load-&gt;view('template',$template);
   }
  
  public  function updatecareer($id,$data){
  
      //$this-&gt;db-&gt;select('careers');
       $this-&gt;db-&gt;where('id', $id);
       $this-&gt;db-&gt;update('careers', $data);
  
  }
  </code></pre>
  
  <p><em>Controller</em></p>
  
  <pre><code>public function editcareer(){
       $id= $this-&gt;input-&gt;post('id');
          $data = array(
                       'jobtitle' =&gt; $this-&gt;input-&gt;post('jobtitle'),
                       'expiriance' =&gt; $this-&gt;input-&gt;post('expiriance'),
                       'qulification' =&gt; $this-&gt;inpu-   &gt;post('qualifications'),
                       'gender' =&gt; $this-&gt;input-&gt;post('gender'),
                       'description' =&gt; $this-&gt;input-&gt;post('description'),
                       'minsalary' =&gt; $this-&gt;input-&gt;post('minslary'),
                       'maxsalary' =&gt; $this-&gt;input-&gt;post('maxslary'),
                       'joblocation' =&gt; $this-&gt;input-&gt;post('joblocation'),
                       'lastdate' =&gt; $this-&gt;input-&gt;post('lastdate'),
                       ); $this-&gt;load-&gt;model('career_model');
      $this-&gt;career_model-&gt;updatecareer($id , $data);
      redirect(base_url().'careersmgr_ctrl/careers_details');
  
  }
  </code></pre>