从数据库获取用户标识的全名并存储在会话中

时间:2014-04-02 19:10:52

标签: php mysql codeigniter session

基本上我想获取full_name并将其存储到会话变量

session_start();

$user_name= $_POST['name'];

$result=$this->db->query("SELECT full_name FROM tbl_admin_users WHERE `user_id`='".$user_name."'");

$_SESSION['user']= $result->row()->full_name;

echo $_SESSION('user');

0 个答案:

没有答案