nitation Posted December 15, 2008 Share Posted December 15, 2008 Good day, I am receiving a notice when i turn on my error reporting. I don't know what to do! Here is my code <?php error_reporting(E_ALL); ini_set('display_errors', 'on'); include_once 'includes/en.php'; include_once 'includes/config.php'; ob_start(); if (isset($_POST['log'])) { $username=$_POST['username']; // This is line 10 This is the notice i encounter: Notice: Undefined index: username in C:\Program Files\xampp\htdocs\myfiles\admin\login.php on line 10 Link to comment https://forums.phpfreaks.com/topic/137016-error-reporting-crisis/ Share on other sites More sharing options...
Yesideez Posted December 15, 2008 Share Posted December 15, 2008 If you're running that for the first time it's because a submit button with a form hasn't been used - it isn't anything to worry about. It's just a notice to let you know. If I turned on full error reporting on my website I'd get quite a few notices like that. If you made a form and had a field called "username" the notice should go away when you submit the form. Hope I've explained that properly! Link to comment https://forums.phpfreaks.com/topic/137016-error-reporting-crisis/#findComment-715628 Share on other sites More sharing options...
nitation Posted December 15, 2008 Author Share Posted December 15, 2008 Am so dumb. How could i have skipped that. It worked! Another thing is how do i update the last login of a user on my database? Link to comment https://forums.phpfreaks.com/topic/137016-error-reporting-crisis/#findComment-715630 Share on other sites More sharing options...
Yesideez Posted December 15, 2008 Share Posted December 15, 2008 Not dumb - just not aware! You mean when a user loogs in update their user profile with a timestamp? Link to comment https://forums.phpfreaks.com/topic/137016-error-reporting-crisis/#findComment-715632 Share on other sites More sharing options...
nitation Posted December 15, 2008 Author Share Posted December 15, 2008 Yes. A scenario like; a user login and the last date and time would be updated and echoed on the home page. Like this: Your last login was on 0000-00-00 Link to comment https://forums.phpfreaks.com/topic/137016-error-reporting-crisis/#findComment-715660 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.