I'm trying to teach myself PHP and I'm getting tied up in knots.
I'm trying to use conditionals to create a pic of the day script. I know it should be easy but my cocked result can be seen under the first banner at:
http://www.jpmr1.com/index.html
The code I'm using is:
<php?
$today = date("l");
if ($today == "Sunday")
{
print ("<img src=\"http://www.japamor.com/banners/ferrocash/sfs/200x250_001.gif\">");
}
if ($today == "Monday")
{
print ("<img src=\"http://www.japamor.com/banners/ferrocash/sfs/200x250_002.gif\">");
}
if ($today == "Tuesday")
{
print ("<img src=\"http://www.japamor.com/banners/ferrocash/sfs/200x250_003.gif\">");
}
if ($today == "Wednesday")
{
print ("<img src=\"http://www.japamor.com/banners/ferrocash/sfs/200x250_004.gif\">");
}
if ($today == "Thursday")
{
print ("<img src=\"http://www.japamor.com/banners/ferrocash/sfs/200x250_005.gif\">");
}
if ($today == "Friday")
{
print ("<img src=\"http://www.japamor.com/banners/ferrocash/sfs/200x250_006.gif\">");
}
if ($today == "Saturday")
{
print ("<img src=\"http://www.japamor.com/banners/ferrocash/sfs/200x250_001.gif\">");
}
?>
I've spent hours trying to see what I've done wrong and its very frustrating. If anyone can help I'll be most grateful.
Cheers
