Jump to content

STORING PICS IN MYSQL


l0ve2hat3

Recommended Posts

what you do is store the names in your database

and then use a mysql_query() to get the

names from your database then just echo something

like this:

 

$query = mysql_query("SELECT * FROM images");

 

while($image = mysql_fetch_object($query)){

echo "<img src='/folder/". $image->name ."' />";

}

 

There is one alternative to the above mentioned ideas.You can make the database field to hold BLOB rather than varchar and when u store the image in the database it will be stored in binary format.There are many tutorials online about storing BLOB object in database,why dont u try one?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.