or download this
$sql = "INSERT INTO ? VALUES (?)";
$std = $dbh->prepare($sql) or die("Could not prepare! At table = $tabl
+e_name because " . $dbh->errstr);
...
$theValue = $values[$t];
$std->execute($table_name , $theValue) or die("Could not execute!" . $
+dbh->errstr);
}