Fallen_angel Posted January 19, 2007 Share Posted January 19, 2007 Hi , I need to make a script that basicly operates like a slide show for my FAQ web app I guess I should give a little back ground first , I am creating a faq web app and the members are able to upload up to 8 images to be used in their tutorial, these images are uploaded to an uplaods folder and a row is writen in the database with the uploads name. makign it easy to keep track of.at the moment the images they upload come up in one strip with a slidding bar to move across it however I wanted to also add a feture that would allow the members to see the images from any one tutorial in a slide show SO basicly what I need it to do it query the database and find all the relivant images ( that part I'm all clear with ) I then want these images to be viewable through a slideshow should the member wish to do so I am fine will pulling the relivant reccord from the database however what I don't know how to do though is que up the images to be shown one after the other , the only way I can figure out how to do it , is by having the page refresh every 10 secconds and with each refresh it pulls a random row that is relivant to that tutorial , the only thing that worries me abotu that is that they are not nesseceraly goin to view all the images and they ae likely to get at least one duplicate row pulled out If someone coudl point me in the right direction as to what I shoudl be lookign into to figure this out I would really apreciate it . even some correct terminoligy for what i need would be fantastic so that i could search google for info regards, and thankyou in advance Fallen_ angel Quote Link to comment https://forums.phpfreaks.com/topic/34854-creating-a-slide-show-script/ Share on other sites More sharing options...
pocobueno1388 Posted January 19, 2007 Share Posted January 19, 2007 I don't think PHP can do this...maybe Javascript? Quote Link to comment https://forums.phpfreaks.com/topic/34854-creating-a-slide-show-script/#findComment-164358 Share on other sites More sharing options...
anatak Posted January 19, 2007 Share Posted January 19, 2007 you could do this by creating an array of the imageslike$row=mysql_fetch_array($resultt_of_query)$i=0for each $row{$i++image[$i]=$row['picture'];}after you have the arrayyou refresh the page and put the nr of pictures in your array and the picture you just displayed in the url www.yoursite.com/slideshow.php?id=0&max=6 (you showed the first pictures of 7 in your array)after refreshing the page you get the pictures again out of your db into the array and display the next picturenot efficient but you can do it this way.anatak Quote Link to comment https://forums.phpfreaks.com/topic/34854-creating-a-slide-show-script/#findComment-164380 Share on other sites More sharing options...
pocobueno1388 Posted January 19, 2007 Share Posted January 19, 2007 You can do it like anatak said...but it won't do it by itself like I think you want. Quote Link to comment https://forums.phpfreaks.com/topic/34854-creating-a-slide-show-script/#findComment-164639 Share on other sites More sharing options...
anatak Posted January 20, 2007 Share Posted January 20, 2007 if you want to refresh the page automatically just do it with <meta http-equiv="refresh" content="<?php echo $time; ?> ; url=http://<?php echo $url; ?>" />$time is the amount of seconds that the page will be displayed before redirecting to $urlanatak Quote Link to comment https://forums.phpfreaks.com/topic/34854-creating-a-slide-show-script/#findComment-164763 Share on other sites More sharing options...
Fallen_angel Posted January 21, 2007 Author Share Posted January 21, 2007 Thank you both very much for your help , I have come down with the flu so have not been able to get to my machine for a few days , Will give the suggestion a shot and let you know how I go with it :)thank you very much again for your assistance Quote Link to comment https://forums.phpfreaks.com/topic/34854-creating-a-slide-show-script/#findComment-165235 Share on other sites More sharing options...
mattd8752 Posted January 21, 2007 Share Posted January 21, 2007 I would personally do it in AJAX. That could speed it up a bit, and with preloading images. The AJAX part would take alot of time. But if you wanted to do it with PHP you would basically include a frame in the bottom very small, and use wait() or something like that (you'd have to look it up). Then make that page have a header of a new page. Quote Link to comment https://forums.phpfreaks.com/topic/34854-creating-a-slide-show-script/#findComment-165256 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.