wmguk Posted April 21, 2008 Share Posted April 21, 2008 hey guys, I am looking about and i just need a very simple code that will display the contents of http://domain.co.uk/clients/$login and allow the user to pick one of the images shown, and just store the filename in a field on the database. I can do the add the name to the database but I cannot find any really simple code to just display and select the image. I tried to use the AJAX simple file browser, but that has 5 pages and doesnt seem to allow anyway to have the $login variable passed, so has anyone got any ideas. very very very simple, just display a 100px thumbnail and click it. - that either then files a text box with the name and click submit to enter in to the database, or just on click and name is entered. Thanks in advance Link to comment https://forums.phpfreaks.com/topic/102120-very-simple-code-for-displaying-file-structure-and-select-one-image/ Share on other sites More sharing options...
craygo Posted April 21, 2008 Share Posted April 21, 2008 You can go here and get a thumbnail generator http://www.phpfreaks.com/forums/index.php/topic,191541.0.html Then use this to show the pictures <?php $image_path = $login.'/images/'; $files = glob($login.'*.jpg'; foreach($files as $f){ echo "<a href=\"processpic.php?$f\"><img src=\"imageresize.php?maxsize=100&source=$f\" /></a>\n"; } ?> Replace processpic.php with the page you will use to insert the picture name. Ray Link to comment https://forums.phpfreaks.com/topic/102120-very-simple-code-for-displaying-file-structure-and-select-one-image/#findComment-522754 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.