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
https://forums.phpfreaks.com/topic/139026-solved-change-field-on-a-certain-date/
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")

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.

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.