Ok, I've changed the code round so now it is:
if (isset($GET['$image_id'])) {
$id = $GET['$image_id'];
$connection = mysql_connect($host,$user,$password)
$db = mysql_select_db($database, $connection)
$query = "SELECT image, image_type FROM tbl_images WHERE image_id = $id";
$result = mysql_query($query);
$data = mysql_result($result,"image");
$type = mysql_result($result,"image_type");
Header( "Content-type: $type");
$data = stripslashes($data);
echo $data;
};
?>[/COLOR]
The image syntax is: ><img src="getdata.php3?image_id=334">
I'm still pretty new to this so I may come off as a little simple here but the images syntax looks at the getdata.php file which runs the select statement and looks for the image_id specified in the image code. Is that right? It does this through the if COLOR=Blue {
$id = $_GET['$image_id']; [/COLOR] code?
Does this make any sense??? I'd really like to be able to make this work and learn how and why it works rather than just doing it.
Thanks again.