Vivid Lust Posted November 6, 2008 Share Posted November 6, 2008 Hey, could someone tell me whats wrong with this please? mysql_query(" INSERT INTO `emails` ( `ip`, `subject`, `message` ) VALUES ( \"$ip\", \"$sub\", \"$msg\" ) ") or die( "There was an error, please contact an administrator" ); It keeps dying. Thanks for the help!! Link to comment https://forums.phpfreaks.com/topic/131644-solved-keeps-returning-error/ Share on other sites More sharing options...
rhodesa Posted November 6, 2008 Share Posted November 6, 2008 let the code tell you what the problem is: mysql_query("INSERT INTO `emails` (`ip`,`subject`,`message`) VALUES ('$ip', '$sub', '$msg')") or die( "MySQL Error: ".mysql_error() ); Link to comment https://forums.phpfreaks.com/topic/131644-solved-keeps-returning-error/#findComment-683767 Share on other sites More sharing options...
Vivid Lust Posted November 6, 2008 Author Share Posted November 6, 2008 Thanks XD It was because I hadn't set id to auto_increment Link to comment https://forums.phpfreaks.com/topic/131644-solved-keeps-returning-error/#findComment-683773 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.