Jump to content

Wait for next Post


balkan7

Recommended Posts

ok i got this one how to check date now?

 

$result = dbquery("SELECT * FROM ".$db_prefix."zelbi WHERE korisnik='".$userdata['user_name']."'");
$find = numrows($result);
if ($find != 0){
while ($row = dbarray($result)){
	$date = date("d-m-Y", $row['date']);
	$now = date("d-m-Y");
}
}

Link to comment
https://forums.phpfreaks.com/topic/97793-wait-for-next-post/#findComment-500462
Share on other sites

i find solution but now need write minuts for next avilable post.

code:

for inseting time in db i used $date = time() + 1800;

$result = dbquery("SELECT * FROM ".$db_prefix."zelbi WHERE korisnik='".$userdata['user_name']."' ORDER BY id DESC LIMIT 0,1");
$find = dbrows($result);
if ($find != 0){
  $row = dbarray($result);
  $check_date = date("d-m-Y H:i:s", $row['date']);
	$now = date("d-m-Y H:i:s");
	if ($now < $check_date){
		$expire = $check_date - $now;
		echo "<div align='center'>".$locale['040'].$expire."</div>";
 }

Link to comment
https://forums.phpfreaks.com/topic/97793-wait-for-next-post/#findComment-500513
Share on other sites

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.