Q:

Error trying to delete uploaded image

I'm trying to delete uploaded photos from a new project, running on localhost, but I keep getting mysqli errors.
Code
$id = $_GET['id'];

$billede_sql = "SELECT * FROM medarbejder WHERE id=$id";
$billede_result = mysqli_query($db, $billede_sql) or die(mysqli_error());
$billede_row = mysqli_fetch_assoc ($billede_result);

unlink("../assets/img/upload/" . $billede_row['billede']);

$sql = "DELETE FROM medarbejder WHERE id=$id";
$result = mysqli_query($sql) or die(mysqli_error());

Errors

Warning: mysqli_query() expects at least 2 parameters, 1 given in /Applications/MAMP/htdocs/slipseknuden/admin/slet_medarbejder.php on line 14
Warning: mysqli_error() expects exactly 1 parameter, 0 given in /Applications/MAMP/htdocs/slipseknuden/admin/slet_medarbejder.php on line 14

A:

Missing the link in mysqli_query(). It should be - 
$result = mysqli_query($db, $sql) or die(mysqli_error());

