Time limit between searches?
mdb Offline
Junior Member
**
Posts: 27
Joined: May 2012
Post: #7
RE: Time limit between searches?
(08-02-2012 11:23 PM)ZiNgA BuRgA Wrote:  Both code paths will never be executed.
Perhaps check this condition

PHP Code:
$_SESSION['last_search'] + $limit < time()


Hmm, this really has me stumped.
As far as i'm aware the first time the user searches, the if statement should return false since $_SESSION['ip'] isn't set yet, so it should skip to the else statement and record the current time of the search. The 2nd time they try to search, the $_SESSION['ip'] var should be set, and then it should check if the recorded time of the first search + 10 seconds is greater than the current time. Obviously that can't be correct or it would work but... how is it wrong? Frown haha
08-03-2012 04:02 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Time limit between searches? - mdb - 08-01-2012, 03:43 PM
RE: Time limit between searches? - Sama34 - 08-01-2012, 05:47 PM
RE: Time limit between searches? - mdb - 08-02-2012, 05:13 AM
RE: Time limit between searches? - mdb - 08-02-2012, 04:38 PM
RE: Time limit between searches? - mdb - 08-03-2012 04:02 AM
RE: Time limit between searches? - mdb - 08-03-2012, 09:48 AM

 Standard Tools
Forum Jump: