Welcome Guest, Not a member yet? Register   Sign In
Simple Ci Queries...............
#1

[eluser]noname525[/eluser]
vv
#2

[eluser]InsiteFX[/eluser]
You should be using the second parameter of $this->input->post to xss_clean your data before inserting it in to your database tables.
Code:
// insert
$name = $this->input->post('country', TRUE);

// update
$name=$this->input->post('country', TRUE);
$this->db->where('id',$this->input->post('id', TRUE));
#3

[eluser]InsiteFX[/eluser]
Code:
// list
function list_country($table){
         $this->db->order_by('id','name');
         $query=$this->db->get($table);

         return $query;
    }

// delete
function delete($id , $table)
     {
       $data=array('id' => $id);
       $this->db->delete($table, $data);
     }




Theme © iAndrew 2016 - Forum software by © MyBB