I have a php script below that creates a table. The table is created with a name according to the user email. But when the table is created, the default value for first_name which is assigned by the variable $firstname is blank. In fact, all the fields are blank. Are there any wrong with my script?
$email = $_SESSION['email'];
$firstname = $user['first_name'];
// Create database for user if not exists
$DB_CON->exec("CREATE TABLE IF NOT EXISTS `".$email."` (
`id` INT NOT NULL AUTO_INCREMENT,
`first_name` VARCHAR(100) NOT NULL DEFAULT '.$firstname.'
PRIMARY KEY (`id`)
)");