HumzaKhan Posted June 27, 2012 Share Posted June 27, 2012 Nowadays, i'm busy with my Image Hosting service which i'm starting. I'm almost done but i need something which i've no idea how to make it. So i was willing that the 5 Most Recent Uploaded Images should appear in a row at the bottom on my index.php. I've no idea how to do that, please help me with this one as this is the only thing stopping me from uploading my files to my server Quote Link to comment https://forums.phpfreaks.com/topic/264894-displaying-recent-uploaded-images/ Share on other sites More sharing options...
ManiacDan Posted June 27, 2012 Share Posted June 27, 2012 If I asked you to find out, by hand, what the 5 most recently uploaded images were, how would you do it? Quote Link to comment https://forums.phpfreaks.com/topic/264894-displaying-recent-uploaded-images/#findComment-1357517 Share on other sites More sharing options...
cs.punk Posted June 27, 2012 Share Posted June 27, 2012 Do you have a date associated with each image? If so you could run a sql query that sorts the images by date in reverse, and hence return the first/last 5 results. Quote Link to comment https://forums.phpfreaks.com/topic/264894-displaying-recent-uploaded-images/#findComment-1357524 Share on other sites More sharing options...
HumzaKhan Posted June 28, 2012 Author Share Posted June 28, 2012 If I asked you to find out, by hand, what the 5 most recently uploaded images were, how would you do it? Well, i will first get the dates of uploads and will use a function to know how which are the most recent. Then, simply will grab the images urls and will echo them in a row at the bottom of my page. i got my answer, thankx Quote Link to comment https://forums.phpfreaks.com/topic/264894-displaying-recent-uploaded-images/#findComment-1357659 Share on other sites More sharing options...
ManiacDan Posted June 28, 2012 Share Posted June 28, 2012 How did any of this get you a working answer? Quote Link to comment https://forums.phpfreaks.com/topic/264894-displaying-recent-uploaded-images/#findComment-1357698 Share on other sites More sharing options...
HumzaKhan Posted June 29, 2012 Author Share Posted June 29, 2012 How did any of this get you a working answer? a little search on google and i got a base to use... Quote Link to comment https://forums.phpfreaks.com/topic/264894-displaying-recent-uploaded-images/#findComment-1357972 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.