I am having a very weird problem with PHP while trying to send a query to MYSQL. Here is my code
$newlogforuser="CREATE TABLE ".$username."-log (date CHAR(30),time CHAR(30),ipaddress CHAR(30))";
// Execute query
if (mysql_query($conl,$newlogforuser))
{
echo "Response from server: Log created successfully";
}
else
{
echo "Response from server: Error creating log: " . mysql_error();
}
The Error: Warning: mysql_query() expects parameter 1 to be string
I know that I am successfully connected to my MYSQL database, so that is not an issue. I know that there are many posts about the same issue on StackOverflow, but one of them fix my problem. Please help!