RE: [PHP-DB] Difference in time

2002-10-02 Thread John W. Holmes
> I am fighting a time issue(don't we all). I have a online poll set up. I > need a way to stop a person from > submitting more than once an hour. As of now I have the time .. mktime( > ) .. being stored in a database along > with the users IP. > > I want to be able to say if 1 hour has passed fr

RE: [PHP-DB] Difference in time

2002-10-02 Thread Jason Vincent
Sent: Wednesday, October 02, 2002 2:56 PM To: Vincent, Jason [BRAM:1334:EXCH] Subject: Re: [PHP-DB] Difference in time MYSQL Here is a sample of what I am doing $ip = $_SERVER['REMOTE_ADDR']; $time_now = mktime(); // open connection to database $connect

RE: [PHP-DB] Difference in time

2002-10-02 Thread Jason Vincent
yeah - the mktime function is returning unix style time (seconds since 1970) which is why only the last few numbers are changing. I would recommend letting the database decide who is able to submit... i.e. select * from database where lastSubmitDate > 'now()- 1 hour' and IP = '$ipaddress' if th