You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '04:47:41)' at line 1 HTML: This happens when I try to insert the date/time into the database when registering a user. $registration_date = gmdate('Y-m-d H:i:s'); if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "registrationForm")) { $insertSQL = sprintf("INSERT INTO sc_users (user_name, user_pass, user_email, user_registered) VALUES (%s, %s, %s, %s)", GetSQLValueString($_POST['username'], "text"), GetSQLValueString($_POST['password1'], "text"), GetSQLValueString($_POST['email'], "text"), $registration_date); Code (markup): my datatype in a SQL database is datetime THANKS FOR HELPING
When you use %s, you have to do this when in an INSERT query: '%s' <---- the single quotes are important. Also if your value is just a number, simply use %d WITHOUT single quotes.
Its a generated code from dreamweaver, but i changed the date part, so I guess changing to %d should work.