I am unable to print out a mysqli binded result.
bind_result($variable)
Every thing in the code seems to work fine, except the display of the binded result.
For example:
If the mysqli query finds 3 results with the search term "Dog", then the following is displayed:
Results:
Results:
Results:
This tells me that everything but the bind_result is working.
The desired display would be would be:
Results: Dog
Results: Fog
Results: Log
Below is my code:
$title = "%".$searchValue."%";
//search by Title
$query = "SELECT Title, ID
FROM Title
WHERE Title LIKE ?";
$stmt = $conn->prepare($query);
$stmt->bind_param('s',$title);
$stmt->execute();
$stmt->bind_result($titleResult); //This is not binding, rest works.
while ($stmt->fetch()) {
echo "Results: ";
echo $titleResult; //This does not echo, rest works.
echo "</br>";
}