I'm making a simple forum.
When a user register's, I trying to create their join date.
CREATE TABLE Users ( userName varchar(15) NOT NULL, registrationDate datetime default NULL )
and then have MySQL automatically set that value:
$sql = "INSERT INTO Users (userName, registrationDate) VALUES ('".$username."' , '".NOW()."')";
The program keeps failing though. when the PHP code is ran it says:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
Am I doing this right?
I think it may be my syntax, but I could be wrong.
Appreciate all help with this. :)