|
|
|
| <?php
if(date("D") == "Sun")
{
$BGColour = "#CCCCCC";
}
elseif(date("D") == "Mon")
{
$BGColour = "#A6CAF0";
}
elseif(date("D") == "Tue")
{
$BGColour = "#E79703";
}
elseif(date("D") == "Wed")
{
$BGColour = "#AE9675";
}
elseif(date("D") == "Thu")
{
$BGColour = "#CFDDF4";
}
elseif(date("D") == "Fri")
{
$BGColour = "#CCCCCC";
}
elseif(date("D") == "Sat")
{
$BGColour = "#A6CAF0";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Change Site Background color daily Using PHP Dynamically</title>
</head>
<body bgcolor="<?php print ("$BGColour"); ?>">
</body>
</html> | |
|
|
| Kewl Date Example Categories : PHP, HTML and PHP, Date Time, CSS, Beginner Guides | | | Local Time clock and Server time usign PHP and JavaScript Categories : PHP, Java Script, Date Time, Beginner Guides | | | Find the day of the week for any given year/month/day. Categories : PHP, Date Time, Data Validation, Algorithms, Beginner Guides | | | Find if a year is leap. Categories : PHP, Date Time, Beginner Guides, Data Validation | | | How to Insert a Date Format Into MySQL from PHP Categories : PHP, Databases, MySQL, Date Time, Beginner Guides | | | Script loading time Categories : PHP, Beginner Guides, Date Time | | | Simple Javascript CSS Digital Clock Categories : Java Script, Date Time, CSS, Beginner Guides, Web Design | | | email new items in db Categories : PHP, Email, Databases, MySQL, Beginner Guides | | | A Timing Class Categories : PHP, PHP Classes, Date Time | | | A very simple PHP single password cookie based login without usernames. Categories : PHP, Cookies, Security, Beginner Guides | | | PHP based Contact email form with multiple recipients, text file based, supports departments. Categories : PHP, Email, Beginner Guides, Filesystem | | | Finding the day of the week for a specific date.
Categories : PHP, Databases, MySQL, Date Time | | | A wrapper function to format dates coming from a databases with the
same syntax as PHP's date() function. Categories : Date Time, Databases, PHP | | | pcCalendar class - Allows for the creation of calendars in HTML pages. All output functions can be easily overridden, refer to article 1471 for an example.
Categories : PHP, Date Time, Calendar, PHP Classes | | | Newbie Notes #8 - A cron trick Categories : PHP, CURL, Beginner Guides | |
|
|
|