Jump to content

[SOLVED] Applying a time limit to edit posts


runnerjp

Recommended Posts

humm ok so iv got my post added into the db as 'showtime'

 

to edit a post i do this

 

use a link with the post id in it like so

 

<a href="index.php?page=reply&forum=<?php echo $forum; ?>&id=<? echo
$forumpostid ?>&pid=<? echo $getreplies3['editid']; ?>">Edit</a>

 

so how can i find out if 2 hours have passed to use in if statement?

 

i tried this

 

    <?php   
      $last_active = time() - $getreply3['showtime'];
			echo ($last_active < 300)  ? ' <a href="index.php?page=reply&forum=$forum&id=$forumpostid&pid=$getreply3["'.postid.'"]">Edit</a>| Report ': "Edit";?>

 

but it just shows edit even if the time has been 2 seconds :S

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.