T
|
thesofa 10/6/2008 |
OK, you have been waiting a while so I have dug out what I recall of posts about time, try here where you will find links to other posts about time |
J
|
jbartc author 11/8/2008 |
I would like to prevent users from editing records after a certain interval has elapsed since the record was created, 1 month for example. I already have fields that automatically store the date when a record is created and when it is edited. I believe that what I need to do is compare the stored date with the current date and "return false" if the allowed edit interval is exceeded. What I am having difficulty with is determining how compare dates in PHP. From what I can tell, there is no PHP equivalent to the "DateDiff" function. I imagine that I am overlooking somehting quite simple. Any assistance would be appreciated.
|