【发布时间】:2014-02-04 07:09:33
【问题描述】:
另一个问题——在用户控制器登录方法中,检查按下按钮(登录或忘记密码)后,在行:$data = $this->user_model->login();返回正确的用户信息;在仪表板中使用的“用户名,家庭,用户ID”用于日志表和页面标题如何将此数据发送到仪表板?
我试图通过 redirect() 发送它,但它失败了
if ($this->form_validation->run() == TRUE) {
if (!empty($_POST['login'])) {
$data = $this->user_model->login();
if ($data != NULL)
{
redirect('dashboard');
} else {
redirect('user/login', 'refresh');
}
} elseif (!empty($_POST['forget'])) {
redirect('user/recover');
}
}
$this->data['subview'] = 'users/login';
$this->load->view('users/_layout_modal', $this->data);
【问题讨论】:
-
你可以把它们放在会话中:
标签: php codeigniter submit form-submit