|
Tech Support Have a problem? Maybe we can help! |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||
|
IMG from DB to page
How do i display the image (binary data) from the database into an img on a page?
this is what i have... aint workin img caller: Code:
<img src="mapdb_img.php?mid='.$row['mid'].'" width="100" height="100" class="imgborder" /> if($mid) { $query = "SELECT screen FROM mapdb_maps WHERE mid='$mid'"; $result = mysql_query($query); while($row = mysql_fetch_array($result)){ $data = $row['screen']; } header("Content-type: image/pjpeg; Content-type: image/jpeg; Content-type: image/gif;"); echo $data; };
__________________
- My: Drawings, rants, raves, my cat, designs, and everything else i want to put on the net. Free Teamspeak servers: http://gamersnetwork.us/ |
#2
|
||
|
Ok again i figured this out on my own lol.... maybe someone can find these usefull in the future...
The problem was, i was using a function to make each img display and that function called mapdb_img.php... in the mapdb_img.php i had to include the database connection adn the function scripts for it to execute properly... i think it has to do wiht something about functions not taking in certain variables that are outside of there parameters.
__________________
- My: Drawings, rants, raves, my cat, designs, and everything else i want to put on the net. Free Teamspeak servers: http://gamersnetwork.us/ |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
img thingy | Erik | Sigs and Graphics | 1 | 01-03-2006 01:30 PM |
Open text from page in another page | katana*GFR* | Web design and Programming | 21 | 07-21-2005 10:28 AM |
<Previous page 1 2 3 4 5 6 next page> script | big n00b at php | phphq.Net Forums | 4 | 03-11-2005 12:35 PM |
img | spinal | Feedback / Novahq.net Support | 13 | 01-23-2004 04:13 PM |
db | staffy bull | Sigs and Graphics | 3 | 09-11-2003 12:33 PM |