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!! Quote 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() ); Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/131644-solved-keeps-returning-error/#findComment-683773 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.