Jump to content

[SOLVED] close after date.


grlayouts

Recommended Posts

Say i have a page that after the 25th of the month i dont want people to access. using Date is this possible? i had one for certain days but it didnt work out

 

<?php
$d=date("D");
if ($d=="Thu" || $d=="Sat" || $d=="Sun" || $d=="Mon" || $d=="Wed") {

exit;
}else{?>

<?php } ?>

Link to comment
Share on other sites

this might work

<?php
$openDate = 20071201;
$closeDate = 20071225;
$todaysDate = date(Ymd);
if($closeDate<$todaysDate){
die("PAGE IS CLOSED");
}elseif($openDate<$todaysDate){
(some kind of refresh to the page you want it to go to.)

}
?>

 

at least i think that will work. Dunno hope it helps

Link to comment
Share on other sites

i'm taking about

<?php
$openDate = 20071201;
$closeDate = 20071225;
$todaysDate = date(Ymd);
if($closeDate<$todaysDate){
die("PAGE IS CLOSED");
}elseif($openDate<$todaysDate){
(some kind of refresh to the page you want it to go to.)

}
?>

open and close dates have years..

???

 

or are we taking about the one above that i said, but didn't work? lol

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.