[thelist] Adding 15 mins to PHP time...
Ken Robinson
kenrbnsn at rbnsn.com
Wed Dec 13 10:13:31 CST 2006
Quoting Tris <beertastic at gmail.com>:
> MAny thaks to all..
> I ended up doing:
>
> $_SESSION[timeStart] = date("H:i:s");
> $_SESSION[timeEnd] = date('H:i:s',strtotime('+15 minute'));
>
> and just putting::
>
> if ($_SESSION[timeEnd] <= $_SESSION[timeStart]) {
> $pageDisplay = "TIMES UP!";
> }
>
> on each page...
>
> Hopefully it'll work.. right? ;-p
> o rdo I have to convert it to a unix time stamp blah blah blah..
Remember, you're comparing strings here. If you convert to a UNIX
timestamp you
will be comparing integers.
Ken
More information about the thelist
mailing list