I have the following:
<form method="POST" action="<?php echo site_url('admin/updateCoursesIn'); ?>">
<input type="text" value="1" name="values">
<input type="text" value="2" name="values">
<input type="text" value="3" name="values">
<input type="submit" value="Submit">
</form>
Function in codeigniter:
public function updateCoursesIn($from = "") {
$data['value'] = json_encode($this->input->post('values'));
$this->db->where('key', 'courses');
$this->db->update('frontend_settings', $data);
}
I need to save these values via codeigniter in json format, like this:
["1","2","3"]
The function I created is not saving as I need it.