insert a values in php
11:54 05 Nov 2015

I want to insert groupID to the db this is my model

public function getgroupID()
{
    $username = $this->session->userdata('username');
    $query = $this->db->query("select groupID from groups where member01ID='$username'");
    return $query->result();
}

this is my view

groupID . " '  >" . $row->groupID . " ";
} ?>

i can insert other values but i cant insert groupID.the problem is i dint know how to get groupID to insert(because groupID get from login information (in model))

php codeigniter insert