I have a simple form, and a date that tells when user has submitted:
$timestamp = time();
$time = date("d/m/Y", $timestamp);
Date is sent to my database. Now, on my browse page (that contains all posts that were submitted) I'd like to display a div with "new post" for, let's say 2 days since the publish date. After that time, the div dissapears.
How can I set the time for which my element will be visible?