|
|
| <?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> | |
|
|
| Simple Javascript CSS Digital Clock Categories : Java Script, Date Time, CSS, Beginner Guides, Web Design | | | Script loading time Categories : PHP, Beginner Guides, Date Time | | | How to Insert a Date Format Into MySQL from PHP Categories : PHP, Databases, MySQL, Date Time, 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 | | | Count Number Of weeks in Month Categories : PHP, Date Time, Beginner Guides | | | Kewl Date Example Categories : PHP, HTML and PHP, Date Time, CSS, Beginner Guides | | | Real simple example of removing HTML tags from text then changing \n (new line) to <br>. Could be used in a forum for instance. Categories : HTML, PHP, HTML and PHP, Beginner Guides | | | Checks Date-Input from HTML-Forms and converts to YYYY-MM-DD Format for MySQL Date-Fields Categories : MySQL, Date Time, PHP, Databases | | | If you want to create select buttons featuring current date this example will show you how... Categories : Date Time, HTML and PHP, PHP | | | Ensure that a specific value lies within a specific range. Categories : PHP, Beginner Guides, Data Validation | | | Phorum, MySQL, Language, UK date format, MySQL UK Date format Categories : PHP, Date Time, Strings, MySQL, Databases | | | Creates three SELECT form fields: Month, Day, and Year. You give it a string which will be used to make the name for the three fields, and a number of seconds to use as the default date. If you give it blank for this value, the current date is used. Categories : HTML and PHP, PHP, Date Time | | | Newbie Notes #7 - Ridiculous regex Categories : PHP, Beginner Guides, Regexps | |
| |
| |
|