I everyone,
In an existing database called "book", I'm trying to create a table with the name: "users" but instead of a new table I'm getting a new error.
This is my code:
The error message that shows up says:
Thanks
In an existing database called "book", I'm trying to create a table with the name: "users" but instead of a new table I'm getting a new error.
This is my code:
Code:
<?php
DEFINE ('DB_HOST', 'localhost');
DEFINE ('DB_USER', 'root');
DEFINE ('DB_PASSWORD', 'test');
DEFINE ('DB_NAME', 'book');
$dbcon = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME)
OR die ('Could not connect to MySQL: ' . mysqli_connect_error () );
CREATE TABLE users
(
user_id MEDIUMINT (6) UNSIGNED
AUTO_INCREMENT,
fname VARCHAR(30) NOT NULL,
lname VARCHAR(40) NOT NULL,
email VARCHAR(50) NOT NULL,
pass CHAR(40) NOT NULL,
registration_date DATETIME,
PRIMARY KEY (user_id)
);
mysqli_set_charset($dbcon, 'utf8');
?>
Can I get some assistence with that please?Parse error: syntax error, unexpected 'users' (T_STRING) in C:\xampp\htdocs\folder \scripts\create_users.php on line 9]
Thanks