I'm trying to create a simple database table using the PHP MySQL Querry "Create Table", but it's not working.
What is wrong with the below code?
// Make a MySQL Connection
mysql_connect("localhost","the_database_name","the_database_password") or die(mysql_error());
mysql_select_db("the_database_name") or die(mysql_error());
// Create a MySQL table in the selected database
mysql_query("CREATE TABLE downloads_list(
download_id INT(7) UNSIGNED NOT NULL AUTO_INCREMENT,
download_date TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
visitor_first_name VARCHAR(20) NOT NULL,
visitor_last_name VARCHAR(20) NOT NULL,
visitor_email VARCHAR(50) NOT NULL,
visitor_phone VARCHAR(30) NOT NULL,
store_name VARCHAR(20) NOT NULL,
document_name VARCHAR(200) NOT NULL,
PRIMARY KEY (download_id)")
or die(mysql_error());
echo "Table Created!";