FORM

PHP Code:
<?php
if($_POST['submit']){
    
$section mysqli_prep($_POST['table']);
    
$linkid mysqli_prep($_POST['linkid']);
    
$title mysqli_prep($_POST['title']);
    
$des mysqli_prep($_POST['des']);
    
$date mysqli_prep($_POST['date']);
    if(isset(
$_POST['facebook'])){$facebook mysqli_prep($_POST['facebook']); } else { $facebook NULL; }
    
    
$sql "INSERT INTO ? (
            `linkid`, `title`, `description`, `date`, `facebook`
            ) VALUES (
            ?, ?, ?, ?, ?
            )"
;
    
$stmt mysqli_stmt_init($connect);
    
mysqli_stmt_prepare($stmt$sql);
    
mysqli_stmt_bind_param($stmt'sissss'$section$linkid$title$des$date$facebook);
    if(
mysqli_stmt_execute($stmt)){
        
// Success!
        
$display_message "<h6 class=\"displaymessage\">Ministry news article created successfully!</h6>\n";
    }else{
        
// Failed!
        
$display_message "<h6 class=\"displaymessage\">Ministry news article creation failed.</h6>\n";
        
$display_message "<h6 class=\"displaymessage\">".mysqli_error($connect)."</h6>\n";
    }
    
mysqli_stmt_close($stmt);
}
?>
Returns...

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 '? ( `linkid`, `title`, `description`, `date`, `facebook` ) VALUES ( ?, ' at line 1
Is it possible that the selected table cannot be a (?) value? I have done this no problem with basic sql queries in the past...