I'm trying to create a table from the user's email, and I'm using the code below:
$email = $_SESSION["email"];
echo $email;
$create=mysql_query("CREATE TABLE userpics_'$email' (id_user VARCHAR(60), id_pic VARCHAR(200), id_tipo INT(2))");
if (mysql_query($create))
{
echo "TABLE created.";
}
else
{
echo "Error in CREATE TABLE.";
}
If the user is [email protected], the table name must be [email protected]. With this code, I get the message "Error in CREATE TABLE." according to the else. Can anyone tell me where I might be going wrong? Maybe it's some syntax error ...