$queryStatus = mysql_query("INSERT into `database`.`users` (`first`, `last`, `pass`, `user`, `id`, `email`, `active`) VALUES ('$first', '$last', '$password', '$user', NULL, '$email', '0'") or die("BAD QUERY: " . mysql_error());
The ID field is NULL because it is an auto-increment. But it is throwing a syntax error and I really can’t find out why. Please help.
Ignore the ID field, it will insert the value automatically:
Also your query seems badly formed (incorrectly places quotation mark at end), I’m not sure about PHP specifically but this should work: