Jump to content

[SOLVED] If date expire cannot edit


sungpeng

Recommended Posts

yes current field in mysql is 2009-06-23 03:31:49 format

Kind of an ugly date format, for doing something like this a UNIX time stamp would be preferred. But you can do something like:

 

$part = explode(' ', $row['time'])
$day = explode('-', $part[0]);
if($day[2] + 5 >= date("j"))
{
    //Can edit
}
else
{
  //can't
}

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.