Setting up a website and trying to get an image to display using values from a database.
Tried changing variables, and redoing the databse, not much has worked. Here is the different code used, starting with the problem area. the error says the issue is with 'line 5'. And secondly the database connection code.
<?php
require "../includes/header.php";
require "../includes/db_handler.php";
$sql = "SELECT * from products WHERE featured = 1";
$featured = $db->query($sql);
?>
------------------------------------------------------
<?php
$server = "*******";
$username = "*****";
$password = "";
$db = "******";
$conn = mysqli_connect($server, $username, $password, $db);