Hi,
Currently I am working on a site that lets users upload photos for their personal page.
This page is just a prototype so some of the code is very sloppy so I really should not post all of it. Anyway, here is some:
$id =$_GET['id'];
if(!isset($id) || empty($id)){
die("Please select your image!");
}else{
$query = mysql_query("SELECT * FROM upload WHERE id='".$id."'");
$row = mysql_fetch_array($query);
$content = $row['content'];
header ('Content-type: image/jpg');
echo $content;
}
My problem is the photo is displayed but not with all the html from the page.
I'm thinking that it's the header at the end.
My question is how can I display photo in a html page. All tutorials I found just teach how to display image on blank page.
Thanks