Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]
I'm a php novice.
I have a database of images. How can I write a php script that can be included in the image tag like:
<img src="getImage.php?name='face.gif'">
so far I have managed this ...Code: Select all
$imgName=$_GET['name'];
$conn = odbc_connect("websale", "root", "");
$query="select img_data from images where img_name='$imgName'";
$rs=odbc_exec($conn,$query);
odbc_binmode($rs, ODBC_BINMODE_RETURN);
$imgContent = odbc_result($rs, 1);
header('Content-type: ' . image_type_to_mime_type(IMAGETYPE_WBMP));
echo $imgContent; // < haha ?Jcart | Please use
Code: Select all
andCode: Select all
tags where appropriate when posting code. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]