You are here: Re: Another dumb newbie question regarding Date and Time « PHP Programming Language « IT news, forums, messages
Re: Another dumb newbie question regarding Date and Time

Posted by Carl Vondrick on 10/05/01 11:38

Denebola wrote:
> I want to be able to display an image (with integral link to an
> external site) on my webpage at 08:00:00 Monday and a different image
> (also with integral link to an external site) at, for example,
> 08:10:30 Monday, and again at 08:45:10 Monday etc etc.

You can use the date() function.
http://us3.php.net/manual/en/function.date.php

For example:

// Switch statement based off server time
switch (date('H i s D'))
{
case '08 10 30 Mon':
print 'Image 1';
break;
case '08 45 10 Mon':
print 'Image 2';
break;
}

Depending on how complex you want to get, you can do this by other
means. Can you explain more?

> I also want the clients webpage to refresh as the image changes.

You need some JavaScript for this part. Either use Ajax, reload the
page, or some other system.

- Carl

 

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

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