Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Jul 2007
    Posts
    64
    Member #
    15493
    Hi all. So I'm working on this script and I'm using the mktime function that made a little countdown script. NOW my current goal is that when the countdown ends a new function occurs. Here's my tiny little script:

    $target = mktime(0, 0, 0, 0, 0, 0) ;
    $today = time () ;
    $difference =($target-$today) ;
    $hours =(int) ($difference/3600) ;
    $minutes =(int) ($difference/1800) ;
    $seconds =(int) ($difference/900) ;
    print "Our event will occur in $hours hours, $minutes minutes, $seconds seconds" ;

    if ($today == $target)
    echo "SAMPLE1";
    else
    echo "SAMPLE2";

    I've edited out the proper target times for the sake of this post. Now CLEARLY I'm doing something wrong because whenever the time does equal the target it echoes "Sample 2". Can anyone help me out here?

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Debug, echo the two variables to make sure they are actually the same value?


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:23 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com