CodeIgniter Forums
Undefined index: userid & Fatal error: ob_start - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Undefined index: userid & Fatal error: ob_start (/showthread.php?tid=17038)

Pages: 1 2


Undefined index: userid & Fatal error: ob_start - El Forum - 03-27-2009

[eluser]Stelian Mocanita[/eluser]
On the code I sampled above you should e able to login as long as the username and password are correct and num_rows() is greater than 0.

Keep in mind to change the way you check and change the way you validate if the users is logged in or not as $_SESSION will no longer work for you and you will have to check the username for example with
Code:
$this->session->userdata('userid')
instead of
Code:
$_SESSION['userid']
.

Also you can dump the query content here just by using var_dump();


Undefined index: userid & Fatal error: ob_start - El Forum - 03-29-2009

[eluser]langithitam[/eluser]
Sory Stelian, dont understand. U can call me lamer. Can u explain it more detail using common language


Undefined index: userid & Fatal error: ob_start - El Forum - 08-26-2009

[eluser]midknight[/eluser]
Just ran into this.
Your welcome controller needs to start a session as well.

function welcome()
{
parent::Controller();
session_start();
}