I am getting a parse error when I run my script
Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in C:\Program Files (x86).................\get.php on line 24
I cant see whats wrong, can someone help me with it?
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "database;
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname) ;
// Check connection
if ($conn->connect_error) 
    {
    die('Connection failed: ' . $conn->connect_error) ;
    } 
else 
    {
    $product1 = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT) ;
    $query = 'SELECT price FROM forms WHERE name=' . $product1 . ' ' ;
    $res = mysql_query($query) ;
    if (mysql_num_rows($res) > 0) 
    {
    $result = mysql_fecth_assoc($res) ;
        echo json_encode($result['price']);
    }
    else
        {
        echo json_encode('no results') ;
        }
    }
?>
 
     
     
     
    