depojones Posted May 1, 2010 Share Posted May 1, 2010 Hello, I created a script that can upload an image to a folder and store the image file name to Mysql DB. I just wanna know, how do i retrieve all the images on the same page. Link to comment https://forums.phpfreaks.com/topic/200394-image-issues-n-php/ Share on other sites More sharing options...
ialsoagree Posted May 1, 2010 Share Posted May 1, 2010 You would run a select statement on your database with no where or limit clauses. Beyond that, I don't think we can help you without seeing relevant code. Link to comment https://forums.phpfreaks.com/topic/200394-image-issues-n-php/#findComment-1051637 Share on other sites More sharing options...
onthespot Posted May 1, 2010 Share Posted May 1, 2010 If the names are all stored within the same table, you can just SELECT the names and then run the neccessary script to allow those image names to do something! Link to comment https://forums.phpfreaks.com/topic/200394-image-issues-n-php/#findComment-1051655 Share on other sites More sharing options...
depojones Posted May 2, 2010 Author Share Posted May 2, 2010 I was able to find solution myself. For anyone who's viewing this, I managed to use the following. <?php include 'db.php'; $sql_ret = mysql_query("select pic_name from $tbl_name"); while ($row = mysql_fetch_array($sql_ret)) { echo '<img src=upload'. $row['pic_name'].'><br><br>'; } ?> Thanks Link to comment https://forums.phpfreaks.com/topic/200394-image-issues-n-php/#findComment-1051868 Share on other sites More sharing options...
Ken2k7 Posted May 2, 2010 Share Posted May 2, 2010 You should add an alt attribute to img. Link to comment https://forums.phpfreaks.com/topic/200394-image-issues-n-php/#findComment-1051869 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.