codeigniter - Code igniter update function on dropdown menu -
i have update function on codeigniter
my controller is
public function updatepersonalinfo(){ $id = $_get['id']; $data['content'] = $this->employees_model->personalinfo($id); // current information updated $data['content1'] = $this->employees_model->nationality(); // select box value $data['content_view'] = 'employees/edit_personalinfo'; $this->templates->admin_template($data); }
then view 1 of select box is
<select class="form-control" name = "blood_type"> <option value="<?php echo $content->blood_type; ?>"><?php echo $content->blood_type; ?></option> <option value="a"> </option> <option value="b"> b </option> <option value="ab"> ab </option> <option value="o"> o </option> </select>
what happens here example, value updated a
it become
what wanted is, example, value update database b
update function show this.
Comments
Post a Comment