How to reterive picture from mysql db? and display it in while()?
Hello guys!
I have the following code !
PHP 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?
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!
You're a victim of spam there :P
Is picName just a filepath to the image, or binary/encoded image data?
__________________
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php