You are here: Re: How to change pictures everyday using php « All PHP « IT news, forums, messages
Re: How to change pictures everyday using php

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация