Jump to content

[SOLVED] Change field on a certain date.


tqla

Recommended Posts

Hello.

 

I have a boolean field in my table - either True or False. 

 

Is it possible to make a PHP/MySQL script that will automatically change the field from True to False and vice versa?

 

For example:

 

On Feb 1st, 2009 make this field True. On March 1st, 2009 make it False.

 

Thanks!

 

Link to comment
Share on other sites

Hello dennismonsewicz,

 

Do you mean something like this?

 

$date = date();
$true_date = "a manually input date"
$false_date = "a manually input date"

if ($date = $truedate){
code to change field to True
} 

if ($date = $falsedate){
code to change field to False
}

 

If so, how do I match date() with a date that I have input? ("a manually input date")

Link to comment
Share on other sites

Hello Maq, actually, the schedule will vary. It's so that I can have control over when a page will be visible or not.

 

For example, I want the ability to say that the page will be visible from Feb 1st, 2009 to March 1st, 2009. The dates will be different per Page and I will have the ability to change them at will.

 

 

 

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.