Computer-Tachnalogy Headline

Seach

PHP Script Image of the day

In this script shows you how to display image of the day. You can adapt this script to display quote of the day, knowledge of the day or something else you want. You don't have to change image everyday just change images once a week.

What to do?

1. Find what today is? using date function and keep answer in variable name "$today".
2. Compare $today with name of the day.
3. Display "Today is " ... " and display image of the day.
4. test it. Try to change your machine date and see the result!

$today=date(l); // Find what today is? using date function

// If today is Monday displays message "Today is Monday" and displays image1.gif
if($today==Monday){ // Compare $today with name of the day.
echo "Today is Monday";
echo "
"; // Line break
echo ""; // images keep in forder "images"
}

-----------------------------------------------------------------------------------------------------------------

If You want to show 1 month 31 images replace with this code

$today=date(d); // display date "01", "02", "03"..."15", "16" ....
if($today==01){ .......

elseif($today==15){ .......

until $today==31






############### Code

echo "";
}

elseif($today==Tuesday){
echo "Today is Tuesday";
echo "
";
echo "";
}

elseif($today==Wednesday){
echo "Today is Wednesday";
echo "
";
echo "";
}

elseif($today==Thursday){
echo "Today is Thursday";
echo "
";
echo "";
}

elseif($today==Friday){
echo "Today is Friday";
echo "
";
echo "";
}

elseif($today==Saturday){
echo "Today is Saturday";
echo "
";
echo "";
}

elseif($today==Sunday){
echo "Today is Sunday";
echo "
";
echo "";
}

?>
Now Save Your work and Finsh.

Downlod  PHP Script  Books

All Done

Search

Keyword Density Tool - AddMe backlink checker Search Engine Submission - AddMe