the previous question is here incase you guys needed a other information:
Fetching information from the database
ANOTHER UPDATE
Although
This can be very simple read the user guide for more simple examples
Model
Class Members Extends CI_Model
{
function __construct(){
parent::__construct();
}
function member_here()
{
$this->db->where('username',$this->input->post('username'));
$query = $this->db->get('membership');
if($query->num_rows() > 0)
{
return $query->result();
}
}
}
Controlelr
Class Login extends CI_Controller
{
function __construct()
{
parent::__construct();
}
public function index()
{
$this->load->view('login_view');
}
public function result()
{
$this->load->model('membership');
$data['member'] = $this->membership->member_here();
$this->load->view('result_view', $data);
}
}
And in View you can simple do it