I am trying to create a table in mySQL. This is my php page below, when I run the page there are no errors but the table is not in mySQL and when I test the code in mySQL I\
You need to understand the difference between PHP and SQL.
You cannot put everything between and ?> into mysql. This is the PHP part. In PHP you will connect to a MYSQL server and send a query to that server. I think you did take everything, because your error specifies near '$user = "root"' at line 1
If you want to test your query, only take the part between $query = " and "; and paste that in mysql to test the query.
So that would only be this part:
CREATE TABLE Bookings
(
id int(6) NOT NULL auto_increment,
name varchar(25),
email varchar(35),
number varchar(20),
buffet varchar(3),
ceilidh varchar(5),
work1 varchar(3),
beg1 varchar(3),
int1 varchar(3),
adv1 varchar(3),
youth varchar(3),
lunch varchar(3),
beg2 varchar(3),
int2 varchar(3),
adv2 varchar(3),
dinner varchar(3),
dance varchar(5),
work2 varchar(3),
lunch2 varchar(3),
price varchar(5),
PRIMARY KEY (ID)
)
Once you do that, juergen d's answer might apply: escape int1 and int2 by changing them into `int1` and `int2` to escape reserved keywords.