I'm trying to display a picture stored in a msyql database. I have the following script, picscript.php, to call the picture from the database:
<?php $username = ''; $password = ''; $host = ''; $database = ''; mysql_connect($host, $username, $password) or die("Can not connect to database: ".mysql_error()); mysql_select_db($database) or die("Can not select the database: ".mysql_error()); $ID=$_GET['ID']; $query = mysql_query("SELECT * FROM norestaurants WHERE ID='".$ID."'"); $row = mysql_fetch_array($query); $content = $row['pic1']; header('Content-type: image/jpg'); echo $content; ?>
I currently have this tag to display it on another page.
All I get is a little picture icon. Any help would be appreciated.