Holiday image php script doesnt work!!
Posted: Wed May 27, 2009 9:01 pm
Greetings php technorati! Again, I humbly ask for your guidance on a matter of great importance. I am trying to create a php script that will switch and image when new month starts. Here is my code:
Here is the error:
Warning: date() expects parameter 2 to be long, string given in *****on line3
Can someone enlighten me?
Thanks in advance!
Batoe
Code: Select all
<?php
$b = Date("l F d, Y");
$month = date("F",$b);
if ($month =! "October")
{
echo "<img src=images/logo.jpg width=323 height=121 >";
}
elseif ($month =! "November")
{
echo "<img src=images/logo.jpg width=323 height=121 >";
}
elseif ($month =! "December")
{
echo "<img src=images/logo.jpg width=323 height=121 >";
}
elseif ($month == "October")
{
echo "<img src=images/halloween_logo.jpg width=323 height=121 >";
}
elseif ($month == "November")
{
echo "<img src=images/Thanksgiving_logo.jpg width=323 height=121 >";
}
elseif ($month == "December")
{
echo "<img src=images/christmas_logo.jpg width=323 height=121 >";
}
?>Here is the error:
Warning: date() expects parameter 2 to be long, string given in *****on line3
Can someone enlighten me?
Thanks in advance!
Batoe