This is a very simple script that will dynamically change the background color of a webpage using simple php script.Just copy an paste the script below.
<html>
<head>
<title>Background Colors change based on the day of the week</title>
</head>
<?
//mistonline.in
$today = date("l");
print("$today");
if($today == "Sunday")
{
$bgcolor = "#FEF0C5";
}
elseif($today == "Monday")
{
$bgcolor = "#FFFFFF";
}
elseif($today == "Tuesday")
{
$bgcolor = "#FBFFC4";
}
elseif($today == "Wednesday")
{
$bgcolor = "#FFE0DD";
}
elseif($today == "Thursday")
{
$bgcolor = "#E6EDFF";
}
elseif($today == "Friday")
{
$bgcolor = "#E9FFE6";
}
else
{
// Since it is not any of the days above it must be Saturday
$bgcolor = "#F0F4F1";
}
print("<body bgcolor=\"$bgcolor\">\n");
?>
<br>This just changes the color of the screen based on the day of the week
</body>
</html>
Incoming search terms:
- php code to change background color (5)
- change background color using php (3)
- setting background colour using php arrays (3)
- php change background color (3)
- how to change background color using php mysql (3)
- how to add background color in php (3)
- background color change using array in php (3)
- how to change color on webpage with php (3)
- changing web browser background color using php (2)
- how to change color of background simple script (2)
- change web page color in php form (2)
- change background color depending on mysql values (2)
- program to change the colour of a webpage using cookies (2)
- php change color today (2)
- php change background color according to day (2)
- jquery disable print screen (2)
- php mysql print array background colors (2)
- changing a background image based on page using css (2)
- changing background color by using arrry in php (2)
- php change the background color based on array (2)
- php codes for changing background as the day change (2)
- php tool chang Bgcolor (2)
- change background of webpages in php (2)
- program to change the clour of a webpage using cookies (2)
- change color of the webpage in php (2)
- php code to change the colour of the web page (2)
- changing background color using php (2)
- php change background color on a form (1)
- javascript code to change background color depending upon the value submitted by jsp (1)
- php change background color with form (1)
- php change background depending on page (1)
- php change background image based on season (1)
- php change background colour based on image (1)
- php change color of background (1)
- php code to change background color according to day (1)
- php code to change background color flash (1)
- php code to cange background color on page (1)
- php code for changing the colour by day (1)
- php changing background of webpage (1)
- php change the background color according to day (1)
You will also be interested in ,
- Simple page flip effect using Jquery, css and simple html
- Adding and removing child nodes using javascript and DOM
- How to close a child window from a parent window using javascript
- CSS or Table?
- Enter only numbers inside a input field of a form using javascript
- Text Size Switching Using PHP
- Learn CSS Basics Very Simple Tutorial
- HTML E-mail Using PHP
- Single and Multiple selection listbox
- How To Set And Get Cookies Using PHP

