i am trying to create a database with the help of prepared statement as shown in this code but it gives me this error Fatal error: Call to a member function bind_param() on boolean in C:\xampp\htdocs\backend.php on line 14 , i know it is giving false condition but why ? how to create the database with prepared statement.
<?php
$conn=new mysqli("127.0.0.1","rfasdfsdaosafasdfot","adsfasdggjhgasgda");
if($conn->connect_error){
echo "there is a error in the connection";
}else{
echo "there is no error in the connection";
}
//$sql="create database mandi;";//this statement is correct by syntax.
//if($conn->query($sql)===true){
//echo "database created";
//}
$pre=$conn->prepare("create database ?");
$pre->bind_param("s",$hh);
$hh="bamo";
$pre->execute();
$pre->close();
$conn->close();
echo("all done");
?>