|
Posted by nemo on 10/10/52 11:17
On Sun, 29 May 2005 18:44:46 GMT, "Luigi Donatello Asero"
<jaggillarfotboll@telia.com> wrote:
>I am wondering how I could let change pictures on a page automatically
>everyday.
>May-be I could
>1) insert the photos in a database
>2) call the photo from the database to the page with an if-clause which
>depends on the date?
To give you a random piccy every time the file is called -
Select piccy from piccy_table order by rand() limit1
The following is not tested, but I would be looking at doing something
like...
if you have a need for just 7 piccies, just let your script decide which day
it is and then
switch ($day)
{
case=Monday:
$piccy_filename=monday_piccy_filename;
break;
etc
etc
}
select piccy from piccy_table where piccy filename = $piccy_filename;
If you're aiming at 31 for the month, or 366 for the year, I suppose the
same sort'v thing would work.
Navigation:
[Reply to this message]
|