I am trying to fetch my data from database using prepare statement in php and I don't understand what I'm doing wrong in this?
Here is my code :
<?php
$host="localhost";
$user="root";
$password="";
$db="simpleinvoicephp";
$conn=mysqli_connect($host,$user,$password,$db);
$sql="SELECT * FROM invoice_user";
$result=mysqli_prepare($conn,$sql);
mysqli_stmt_bind_param($result,$id);
mysqli_stmt_execute($result);
mysqli_stmt_fetch($result);
echo $id;
?>
Error:
This page isn’t workinglocalhost is currently unable to handle this request.
HTTP ERROR 500
Anyone help me out with this problem?
Thak you