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 4 of 4
  1. #1
    Member
    Join Date
    Aug 2004
    Location
    Akron and Alliance, Ohio
    Posts
    41
    Member #
    7231
    I have a small calendar on my website. I use an array of timestamps to mark the dates that have events:
    PHP Code:
    // Make array of dates with events
    $event_numbers[0] = 1188108000;
    $event_numbers[1] = 1190440800
    Then while making the calendar, I check to see if the date being made has an event:
    PHP Code:
    $big_num mktime(0,0,0,$month,$d,$year);
                if(
    in_array($big_num$event_numbers)){
                    
    $day_link "<a href=\"".$_SERVER['PHP_SELF']."?date=".$big_num."\">$d</a>";
                }
                else{
                    
    $day_link $d;
                } 
    And make the table cell accordingly (with or without a link).
    This worked on my hosting server, but when I moved it to it's permanent host, it stopped making links altogether.
    The hosting company I moved to says they have the latest version of php.
    What is wrong?
    Thanks!!

  2.  

  3. #2
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Were you using raw numbers? It's probably in a different timezone or something.

  4. #3
    Member
    Join Date
    Aug 2004
    Location
    Akron and Alliance, Ohio
    Posts
    41
    Member #
    7231
    Yup that was it.
    Thanks!!

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    No problem. I'd advise not using raw numbers, but using mktime for your starting points, too.


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 05:45 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com