Greenguy's Board


Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2006-08-18, 05:06 PM   #1
japamor
I Love Turkish Delight, they're very moreish.
 
Join Date: Nov 2004
Location: UK
Posts: 578
Basic PHP Problem

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
__________________
japamor is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:04 PM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc