I have completed a website in codeigniter. The login page is working in localhost but when I am uploading the same onto the server, the login page is not working. It is showing a blank white page.
$this->load->model("studentsmodel");
$result = $this->studentsmodel->loginCheck($post_data);
if (!$result) {
$this->notifications->notify('Wrong username or password; Login Failed', 'error');
redirect('site/login', 'refresh');
}
else {
$this->session->set_userdata('student_id', $result['id']);
$this->session->set_userdata('stud_cin', $result['stud_cin']);
$this->session->set_userdata('stud_path', $result['stud_path']);
redirect('student/id/'.$this->session->userdata('student_id'), 'refresh');
}
This is the code for login page in codeigniter. If there is no value in $result, the notification "wrong username/password" is not working. Also if there is data inside $result , it is not going to else part. In both the cases it is showing a white blank page. Can anyone suggest a solution for this ? I am using CI 2.1. This all is working properly in the localhost but not in the server. Any problm with refresh being used with redirect().
output of $result is
Array
(
[id] => 2
[stud_cin] => 11AK11
[stud_path] => photo/no-photo.JPG
)
$db['default']['db_debug'] = TRUE;
inconfig->database.php
. – Shihasredirect('student/id/'.$result['id'])
; – Shihas