Reply to Re: Programmatically change my background graphic?

Your name:

Reply:


Posted by Jonathan N. Little on 12/18/06 17:24

Mike Silva wrote:
> Travis Newbury wrote:
>> PHP, ASP
>
> Thanks. Now, how would one choose between them? My website is on a
> Linux server, if that matters.

Well a very simple example in PHP for 1 - 31 backgrounds for each day of
the month...

<?php
// Get the day of the month
$dayOfTheMonth=date("j");
// For background images 'bg1.jpg' to 'bg31.jpg'
$background='pathToImages/bg' . $dayOfTheMonth . ".jpg";
?>

Then insert it in the style element within the head...


<style type="text/css">
BODY { background-image url(<? echo $background; ?>); ... }
...

Very, very simple example...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

[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

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