alen Posted December 15, 2006 Share Posted December 15, 2006 I keep getting an error I can't get rid of:Notice: Undefined index: submit in C:\Program Files\Server\public_html\news\add.php on line 12and here's my code:http://anigma.sitees.com/add.txt Link to comment https://forums.phpfreaks.com/topic/30740-a-simple-error/ Share on other sites More sharing options...
alen Posted December 15, 2006 Author Share Posted December 15, 2006 should I just get rid of the errors with adding:error_reporting(E_ALL ^ E_NOTICE); Link to comment https://forums.phpfreaks.com/topic/30740-a-simple-error/#findComment-141672 Share on other sites More sharing options...
taith Posted December 15, 2006 Share Posted December 15, 2006 just as a forenote... you might want to remove the user/password from submitted code ;-) Link to comment https://forums.phpfreaks.com/topic/30740-a-simple-error/#findComment-141673 Share on other sites More sharing options...
alen Posted December 15, 2006 Author Share Posted December 15, 2006 it doesn't actually matter since it's just a random password on my localhost. Link to comment https://forums.phpfreaks.com/topic/30740-a-simple-error/#findComment-141674 Share on other sites More sharing options...
alen Posted December 15, 2006 Author Share Posted December 15, 2006 changed the passwords :) Link to comment https://forums.phpfreaks.com/topic/30740-a-simple-error/#findComment-141675 Share on other sites More sharing options...
taith Posted December 15, 2006 Share Posted December 15, 2006 also, your missing the time field[code] $result=mysql_error("INSERT INTO news (title,message,who,date,time) VALUES ('$title', '$message', '$who', '$date')"); [/code] Link to comment https://forums.phpfreaks.com/topic/30740-a-simple-error/#findComment-141677 Share on other sites More sharing options...
alen Posted December 15, 2006 Author Share Posted December 15, 2006 sorry about that, i'm removing the time field. Link to comment https://forums.phpfreaks.com/topic/30740-a-simple-error/#findComment-141678 Share on other sites More sharing options...
alen Posted December 15, 2006 Author Share Posted December 15, 2006 i got rid of the errors.. Link to comment https://forums.phpfreaks.com/topic/30740-a-simple-error/#findComment-141684 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.