What's wrong with the following code:
$table = $email . "Entries";
$query = "CREATE TABLE ".$table."(FirstName varchar(15),LastName varchar(15),Age int)";
I want to create a table whose name is dynamic based on a posted variable. The above doesn't work however. I have also tried:
$query = "CREATE TABLE $table(FirstName varchar(15),LastName varchar(15),Age int)";
Any Ideas?
mysql_error()to see what error MySQL is returning.$emailbefore using it? Is it really necessary to create a table from a posted value, or could another more secure method be used?email,FirstName,LastName,Agefields?