I am writing this in PHP
$edit_window = $database_info->timestamp + 86400;
$current_timestamp = time ();
if ($current_timestamp > $edit_window){
$database_info->editable = TRUE;
}
else {
$database_info->editable = FALSE;
}
then
if ($database_info->editable){
//do some major stuff
}
Somehow this code is worrying me. Is it open to vulnerablities? Is there a better approach?