Jump to content

Recommended Posts

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
Link to comment
https://forums.phpfreaks.com/topic/34854-creating-a-slide-show-script/
Share on other sites

you could do this by creating an array of the images
like
$row=mysql_fetch_array($resultt_of_query)
$i=0
for each $row{
$i++
image[$i]=$row['picture'];
}
after you have the array
you 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 picture

not efficient but you can do it this way.

anatak
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 $url

anatak

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
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.
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.