if (isset($_POST['submit'])){
$NAME2=$_POST['name2'];
$query="SELECT id, name, gener, yearofprodction, opinion FROM movie_info WHERE name=.'$NAME';";
$result=mysqli_query($conn,$query);
$resultcheck= mysqli_num_rows($result);
if ($resultcheck > 0 );
{
while ($row =mysqli_fetch_assoc($result)) {
echo 'Name :'.$row['name'].'
'.'Gener :'.
$row['gener'].'
'.'Year of prodction :'.
$row['yearofprodction'].'
'.'Your opinion :'
.$row['opinion'];
break;
}
}
}
What I have tried:
I maked a connection with database and shered it and it still tell there an error in the $query statment I need help