I'm sure this is a rookie mistake. Can you offer some guidance?
Thanks.
When I try:
mysql_connect(localhost,$user,$password) or die('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("my_user") or die( "Unable to select database");
mysql_query("CREATE TABLE pending_user (index int(10) NOT NULL auto_increment,registration_id varchar(255) DEFAULT '0' NOT NULL,fname varchar(30) DEFAULT '0' NOT NULL,lname varchar(30) DEFAULT '0' NOT NULL,email varchar(255) DEFAULT '0' NOT NULL,country varchar(50) DEFAULT '0' NOT NULL,locality varchar(50) DEFAULT '0' NOT NULL,zip int(5) DEFAULT '0' NOT NULL,username varchar(255) DEFAULT '0' NOT NULL,password varchar(255) DEFAULT '0' NOT NULL,date varchar(10) DEFAULT '0' NOT NULL, PRIMARY KEY (index))") or die ( "Unable to create table because: " . mysql_error());
mysql_close();
I get this error:
Unable to create table because: 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 'int(10) NOT NULL auto_increment,registration_id varchar(255) DEFAULT '0' NOT NUL' at line 1