Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: function contact time check bug  (Read 2195 times)

sibas

  • Hero Member
  • *****
  • Karma: 24
  • Posts: 535
    • simply4all a social directory
function contact time check bug
« on: February 02, 2014, 11:37:34 AM »

Hello
in function contact
have this line
Code: [Select]
<?php
$time 
= ( isset($_SESSION[_SITE.'time']) && $_SESSION[_SITE.'time'] === (int)$time && (time() - $time) > 10) ? $time null ;
?>

where checks if the form is inactive for ten minutes, well is not working

change > 10
to < 10

OR $time : null;
to null : $time;

sibas

  • Hero Member
  • *****
  • Karma: 24
  • Posts: 535
    • simply4all a social directory
Re: function contact time check bug
« Reply #1 on: February 02, 2014, 04:48:36 PM »

Sorry even this is not working  :P
 
but the following works  :D

Code: [Select]
<?php
//$time = ( isset($_SESSION[_SITE.'time']) && $_SESSION[_SITE.'time'] === (int)$time && (time() - $time) > 10) ? $time : null ;
$time = (isset($_SESSION[_SITE.'time']) && (time() - (int)$time 600)) ? $time null // 10 min * 60 sec = 600 sec
?>