Hello Tom,
 First of all, since you are keeping the filepaths and filenames you don't
need to worry about any of the filesystem functions.. You just need to
replace variables in the right places in your output HTML code.
 As for how to implement what you need, I will give you a different tip.
Write a php script to randomly select and display images. You can either use
PHP's random functions to accomplish this or if you will store filepath,
filename info in a MySQL database then you can accomplish this by issuing:
"SELECT ... FROM ... ORDER BY RAND() LIMIT 1;" Then you can just stick in
meta refresh tag in your html output and set the value to 15 or 30 seconds..
  So now you have a php page that randomly selects an image and displays it
and refreshes for every 30 or 15 seconds..
  Then in your main HTML page where you want this to be displayed , use
<iframe></iframe> tags to stick that PHP page in.... And you have it on
whereever you want to have:)
  Hope this helps..

  PS. You may wanna stick all filenames into an array and use shuffle()
function as an alternative it thats easy for you..

Gurhan


-----Original Message-----
From: tom hilton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 10:36 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Filesystem functions and mysql


Hi, I'm working on a website for a local tennis group, and we are raising
money to offset website costs through sponsorships.  I have created some 15
and 30 second GIF's for the sponsors, and would like to create a function
that loads the files in random order when the page is opened.  I am creating
a mysql table with file number, file location, file name info, that will be
pulled when the page loads.  I know there are random number functions I can
use, but I haven't ever worked with the filesystem functions.  What
functions would I need to first open the selected file, then move on to the
next file  in the array, once the previous one has closed, and then continue
looping through this array of files until the page is closed?  Any
suggestions or help would be greatly appreciated.



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to