**如何通过使用会话ID来比较来自$ this-> brid_groom_fetch-> get_program_specific_gender()函数**
的数据来检查用户登录的是男性还是女性public function login_autho() {
$data = array(
'uname' => $this->input->post('uname'),
'upassword' => $this->input->post('upassword')
);
$result = $this->login_model->login_user($data);
print_r($result);
$data_session_set = array('logged' => TRUE,
'uname' => $this->input->post('uname'));
$this->session->set_userdata($data_session_set);
}
public function profile() {
$this->load->view('header');
$this->load->model('brid_groom_fetch');
//here how to check gender
$gender_result=$this->brid_groom_fetch->get_program_specific_gender();
}
在配置文件控制器中的我想检查登录用户是男性还是女性邮件
if ($this->session->all_userdata('uname') == "gender") {
echo 'success';
}
else {
echo 'Fail';
}