query($sql)){ die('There was an error running the query [' . $db->error . ']'); }; $row = $result->fetch_assoc(); if ($row){ $_SESSION['noimg'] = false; $_SESSION['id'] = $row['id']; $_SESSION['img'] = $row['name']; $_SESSION['location'] = $row['location']; $_SESSION['type'] = $row['type']; $_SESSION['size'] = $row['size']; $_SESSION['time'] = $row['time']; $_SESSION['comment'] = $row['comment']; $_SESSION['username'] = $row['username']; $_SESSION['tags'] = $row['tags']; echo "

"; //echo "$id
$img
$location
$type
$size
$time
$comment
$username
$tags\n"; }else{ $_SESSION['noimg'] = true; echo "

That image was not found in our database D:

"; } $result->free(); }else{ if($_SESSION['noimg'] == 'search' || $_SESSION['noimg'] == 'tag' || $_SESSION['noimg'] == 'uname'){ }else{ noimg(); $_SESSION['noimg'] = true; } } } ?>