I am passing a query variable in PHP. I would like to make it the table name, but I know there is probably a SQL syntax error. When I print the statement, the variable is passed meaning it works, but the database simply isn't created.
Here is my code for the creation of the database:
$DBName = "database_name"; $sql = "CREATE TABLE '$DBName'.'$login' ( ClientID int NOT NULL AUTO_INCREMENT, AgentClients varchar(15), ClientTotal int )"; mysql_query($sql,$link); where `$login = $_POST['login'];
Also, I'm not worried about security breaches at the moment, so don't worry about that.
Any insight would be greatly appreciated. Thanks.