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 ')' at line 9 I could probably find the error myself tomorrow, as its very late here, but I don't want to go through all the bother, Seems like I'm just missing/have an extra character BP. mysql_connect($host,$dbuser,$dbpass); mysql_select_db($dbname) or die(mysql_error()); mysql_query("CREATE TABLE `results` ( `url` VARCHAR( 30 ) NOT NULL , `submittedby` VARCHAR( 30 ) NOT NULL , `date` DATE NOT NULL , `categoryone` VARCHAR( 30 ) NOT NULL , `category2` VARCHAR( 30 ) NOT NULL , `pr` INT NOT NULL, `title` TEXT NOT NULL, )") or die(mysql_error()); } PHP: