Tentei desta forma:
<?php
include('conexao.php');
$status=$_POST['post'];
$login=$_POST['login'];
$sala=$_POST['sala'];
$data=date("y/m/d");
$hora= date("H:i:s");
$sql="INSERT INTO ",$sala," (login, status, data, hora) VALUES ('$login','$status','$data','$hora','$hora')";
$query = mysql_query($sql) or die(mysql_error());
header("location: home.php");
?>Mas retorna o erro:
"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '
Notice: Undefined variable: sala in C:\Program Files (x86)\Ea' at line 1"
Desde já agradeço por terem pelo menos lido minha dúvida!










