I have read many posts but i cannot find my answer. I am developing a food order/delivery website, which has many food cuisine categories, African, Alcohol, American... Each category is meant to have a different header image. So if the admin creates a new restaurant, when they select the restaurant cuisine, the correct header image will automatically display on the main websites products page for that said restaurant.
I have manually inputted the images into the database already, now i am trying to retrieve the database, my or die statement prints that it is not, but i have no error messages, which is confusing me.
mysqli_report(MYSQLI_REPORT_INDEX);
if (isset($_GET['rest_id'])) {
$Rest = $_GET['rest_id'];
$get_cat_img = "SELECT Cuisine_category
FROM Rest_Category,Category_img
INNER JOIN Rest_Details
ON Rest_Category.Cat_ID = Rest_Details.Cat_ID
WHERE Rest_Details.Cat_ID='$Rest'";
$results = mysqli_query($dbc, $get_cat_img) or die("query is not working");
$row=mysqli_fetch_array($results) or die ("q not working");
$img=$row['Category_img'];
echo $row['Category_img'];
echo '<img src="'.$img.'" alt="background" style="width:100%;height:300px">';
}
mysqli_close($dbc);