1
Hello,
This a more a general PHP question than a XOOPS question. But maybe I can get help with this anyway. As I know there is some php experts hanging out here.
Well,
I currently have a logo for each day of the week.
The is the code I'm using in my theme:
<{php}>
$today=date(l);
if($today==Monday){
echo "<td background='www.mysite.com/logo1.png' border='0'>";
}
elseif($today==Tuesday){
echo "<td background='www.mysite.com/logo2.png' border='0'>";
}
elseif($today==Wednesday){
echo "<td background='www.mysite.com/logo3.png' border='0'>";
}
elseif($today==Thursday){
echo "<td background='www.mysite.com/logo4.png' border='0'>";
}
elseif($today==Friday){
echo "<td background='www.mysite.com/logo5.png border='0'>";
}
elseif($today==Saturday){
echo "<td background='www.mysite.com/logo6.png' border='0'>";
}
elseif($today==Sunday){
echo "<td background='www.mysite.com/logo7.png' border='0'>";
}
<{/php}>
Now I want to take this one step further.
I want a normal drop-down menu there my users can select which logo they ALWAYS want. Their choise should be saved in a cookie. But if they don't select a logo, then the logo for the day should be displayed. It would also be great if there should be a default setting in drop-town to clear/delete the cookie.
Like this:
I would really appreciate if someone could help me with this.
Thanks.