I use login_user to validate login and display username!
I changed my server from ubuntu to windows,
Now I have this problem
Undefined index: login_user in D:\wamp\www\index.php
I know it is because my login_user is null at the index page!
Just how do i switch this warning off?
Undefined index: login_user in D:\wamp\www\index.php on line
Moderator: General Moderators
-
shaunak1234
- Forum Newbie
- Posts: 13
- Joined: Thu Nov 03, 2011 12:24 am
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: Undefined index: login_user in D:\wamp\www\index.php on
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
-
shaunak1234
- Forum Newbie
- Posts: 13
- Joined: Thu Nov 03, 2011 12:24 am
Re: Undefined index: login_user in D:\wamp\www\index.php on
Actually I fixed it my self
In php.ini find “ error_reporting = E_ALL”
Here replace this with “error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING “
Thats it!
may this post help others
In php.ini find “ error_reporting = E_ALL”
Here replace this with “error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING “
Thats it!
may this post help others
Re: Undefined index: login_user in D:\wamp\www\index.php on
You should check if that index exists with isset or empty instead of turning off error_reporting 
- social_experiment
- DevNet Master
- Posts: 2793
- Joined: Sun Feb 15, 2009 11:08 am
- Location: .za
Re: Undefined index: login_user in D:\wamp\www\index.php on
maxx99 makes a good point; the OP doesn't mention about any checking (which they might be doing) but if not it's a better option to do checking instead of hiding the error. For production it's better to see an error and take care of it. For live site purposes, it's better to hide the errors (if you have taken care of them) because you don't want visitors seeing the errors
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering