Why isn’t this updating the table? The db connection is correct and I have confirmed the $values.
$servername = “localhost”;
$database = “mydatabase”;
$dbuser = “mydbuser”;
$db_password = “banana”;
// Create connection
$conn = mysqli_connect($servername, $dbuser, $db_password, $database);
$result = mysqli_query($conn, $sql);
$sql = “UPDATE users
SET
avatar =’$avatar’
WHERE username=’$username’”;