I am working on a site that allows users to upload images into my directory and then a PHP code searches the folder the images are saved to and displays them: </style><?php$dir = "./"; if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { echo '<img src ="'.$dir.$file.'"> <br><br><br>'; } closedir($dh); } } ?> The only problem is that in order to view the images after uploading, the user has to click the link to the gallery instead of instantly being taken there, and then the photos are displayed in a single line down the page. How do I make the site instantly load the gallery page after an upload, and how to I make the photos more organized than in simply in a line?
You should be able to modify the file upload script to respond with a redirect to the gallery page using the header() function in PHP.