I need help to make work this code:
<?php
$a = $_GET["a"];
$stmt = mysqli_stmt_init($conn);
if (mysqli_stmt_prepare($stmt,"SELECT * FROM `?`")) {
mysqli_stmt_bind_param($stmt, "i", $a);
mysqli_stmt_execute($stmt);
$res = mysqli_stmt_get_result($stmt);
while($row = mysqli_fetch_array($res)){
if($row["id"] == 0){
$title = $row["title"];
$mal = $row["mal"];
}
}
mysqli_stmt_close($stmt);
}
?>
In my DB I've some tables with numeric names (1,2,3...) and I want to get the table i want with the variable $a in the url.