View Full Version : How to reterive picture from mysql db? and display it in while()?

10-15-2009, 09:05 AM
Hello guys!
I have the following code !

// mysql_connect(........
// select db ........

$SQL = mysql_query("SELECT * FROM pictures limit 10");

while($row = mysql_fetch_array($SQL)){

echo '<img src="'.$row['picName'].'" />'; // I am sick of thinking about this! where should the extension would appear ? how the src value will be posted here?



Help me please!

10-15-2009, 10:11 AM
Hello everybody!
I am a new member in this forum.I love it so much .
I aslo want to ask you one question.Please tell me your idea.It is so important to me :
How cam I make friend with a pretty girl ?
Thank a lot!


Are you serious !!!

10-15-2009, 10:22 AM
You're a victim of spam there :P
Is picName just a filepath to the image, or binary/encoded image data?