![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Guest
Posts: n/a
|
Php question
I have this If statement
<!-- IF active_module == "homepage" --> show image here <!-- ENDIF --> I only want to use this IF statement on monday - thursday. on friday-sunday I do not want to use the IF statement, so it just shows the image on every page, not just the homepage. How can I make it so that the IF statement only runs monday through thursday, and on friday-sunday it doesnt use the IF? |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,058
|
Quote:
That will check if the day of the week is between Monday (1) and Thursday (4)
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Guest
Posts: n/a
|
thank you!
I know zero about php, do I have to put a <?php> in front of it? im fixing a template i bought |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,058
|
<?php if(date('w',time())>=1 && date('w',time())<=4) {?>
Your template code here <?php } ?> should work. Let me know how it goes
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Guest
Posts: n/a
|
It worked!!!!
you rock, thank you so much!!! |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,058
|
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 | |
Confirmed User
Join Date: Feb 2002
Location: ICQ: 251425 Fr/Au/Ca
Posts: 6,863
|
Quote:
<? if(date('w')>=1 && date('w')<=4) {?> time() is redundant |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,058
|
Quote:
Dangers of answering off the top of my head while I am breaking from code.
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |