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 "