Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
02-15-2006, 02:05 PM #1
- Join Date
- Dec 2005
- Thanked 0 Times in 0 Posts
Retrive image from mysql database, slight problem
i kept at my problem at trying to display an image from the database, i've manged to achieve my target, with the following:-
<img '.$row['image_size'].' src="view_image.php?image_name='.$_GET['image_name'].'"></td>
// get the image from the db
$sql1 = "SELECT img_data,image_name FROM manufact_img.thumb_images WHERE image_name = 'S320.jpg'";
// the result of the query
$result1 = mysql_query("$sql1") or die("Invalid query: " . mysql_error());
// set the header for the image
echo mysql_result($result1, 0);
however as you can see the image name is hard coded (view_image.php), on the main.php file i have a query which displays a specific image name, i want this to replace the hard coded value, any ideas.
but without using a submit button.
any help would be great
thanks in advance.
Last edited by Kal; 02-16-2006 at 11:06 AM. Reason: Got half of it working, still unsure about something else