snowman15 Posted January 8, 2008 Share Posted January 8, 2008 This isnt working, I know something is wrong with it but I cant find it. Probably something with my variables. $query= "INSERT INTO `users` ( `id` , `date` , `first` , `last` , `user` , `password` , `approve` , `email` ) VALUES ( NULL , CURRENT_TIMESTAMP , '".$_POST['fname']."', '".$_POST['lname']."', '".$_POST['user']."', '".$_POST['password']."', NULL, '".$_POST['email']."' );"; $result = $db->query($query); thanks in advanced! Link to comment https://forums.phpfreaks.com/topic/84951-query-insert-quick-help/ Share on other sites More sharing options...
revraz Posted January 8, 2008 Share Posted January 8, 2008 Put a mysql_error() after the end of the query and it will tell you. Are you trying to insert a NULL value into a NOT NULL field? Link to comment https://forums.phpfreaks.com/topic/84951-query-insert-quick-help/#findComment-433197 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.