brad12345 Posted March 16, 2008 Share Posted March 16, 2008 hi all Is anyone able to show me a tutorial that can help me with this problem or some guidance I want to be able to display my uploaded images on their own unique page that php will create automatically and assign the relevant images to so im not having to hard code the html to display the content i want which takes forever, i can allready upload images to my desired new folder using php now i want to have them automatically displayed. Its a realestate website so that might give you a better grasp of what i am wanting. So when i have a new property for sale it can be uploaded quickly to my site. Link to comment https://forums.phpfreaks.com/topic/96358-displaying-users-uploaded-images/ Share on other sites More sharing options...
JD* Posted March 16, 2008 Share Posted March 16, 2008 Are you storing any information about the pictures into a database? Link to comment https://forums.phpfreaks.com/topic/96358-displaying-users-uploaded-images/#findComment-493204 Share on other sites More sharing options...
wmguk Posted March 16, 2008 Share Posted March 16, 2008 this is what i used for mine <?php $NBFile=0; $dir ="SET THE LOCATION OF FILES"; if ($handle = opendir($dir)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $FileArray[] = $dir."/".$file; $NBFile=$NBFile+1; } } closedir($handle); ?><html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <table align="center"><tr> <?php $NBPicswidth=1; $NBPics=0; for ($i=0; $i<$NBFile; $i++) { $Pic_Name1=$FileArray[$i]; ?><td class="image"> <img src="<?php echo $Pic_Name1; ?>" width="100" border="0" align="top"> </td></tr> <?php $NBPics=$NBPics+1; if ( $NBPics==$NBPicswidth ) { $NBPics=0; ?> <?php } } ?></table> </body> </html> Link to comment https://forums.phpfreaks.com/topic/96358-displaying-users-uploaded-images/#findComment-493205 Share on other sites More sharing options...
brad12345 Posted March 16, 2008 Author Share Posted March 16, 2008 no just into folders i specify and create when i upload the images Link to comment https://forums.phpfreaks.com/topic/96358-displaying-users-uploaded-images/#findComment-493208 Share on other sites More sharing options...
wmguk Posted March 16, 2008 Share Posted March 16, 2008 no just into folders i specify and create when i upload the images thats all i do, and i just pass a variable to that page so that it knows what folder to look in for the images its a good little script, totally generates on the fly, so there is no messing about Link to comment https://forums.phpfreaks.com/topic/96358-displaying-users-uploaded-images/#findComment-493211 Share on other sites More sharing options...
brad12345 Posted March 16, 2008 Author Share Posted March 16, 2008 ohk thanks for that but if i were to look up dynamic page creation how would i search for this in google cause i cant seem to find the right words to use?? Link to comment https://forums.phpfreaks.com/topic/96358-displaying-users-uploaded-images/#findComment-493213 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.