Reply to Re: Display message until a certain date

Your name:

Reply:


Posted by Peppermint on 11/30/06 20:35

ZeldorBlat wrote:
> Peppermint wrote:
>> Hi - total newb here. But then you'd figure that out by the easy problem
>> I have:
>> I have a CMS that lets me insert PHP code, and I want to display a
>> message until a certain time, for example:
>> if the current date/time is before Dec 6, 2006, 21:30:00 :
>> <p>Come see our show Dec. 6 at 9:30 PM at the Palace!</p>
>> else:
>> <p>Check here for the next show!</p>
>> Thanks!
>
> <?php if(time() < strtotime('Dec 6, 2006, 21:30:00')) { ?>
> <p>Come see our show Dec. 6 at 9:30 PM at the Palace!</p>
> <?php } else { ?>
> <p>Check here for the next show!</p>
> <?php } ?>
>
works great! except I had to put it as:
strtotime('Dec 6 2006 21:30:00')
it didn't like the commas, I guess.

[Back to original 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

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