Jump to content

Search the Community

Showing results for tags 'timing out script'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 1 result

  1. Hi, this is what I am trying to do: I have to make an enrollment form for a course. I'd like it so that when a date expires it 'dies' and is removed whilst the next date that hasn't come is still 'alive' and when that day comes it 'dies' and so on... So the page would look like this: << ENROLL BUTTON >> June 10th <--- this would have disappeared from view since that day/ date has passed July 10th <-- this is still visible since today is June 29th July 15th <-- this is still visible << ENROLL BUTTON >> I am thinking that when a 'timestamp' variable has expired in just dissapears - but this doesn't work when I tested the below. I think I am missing something very basic - all help very gratefully received! <?php //1. Set the timezone date_default_timezone_set('America/New York'); //2. define the current timestamp $current_timestamp = time(); //3. Define the expiry timestamp $expiry_timestamp1 = mktime(22, 33, 11, 6, 29, 2013); // mktime(hr,mins,sec,mth,day,yr) $expiry_timestamp2 = mktime(23, 34, 11, 6, 29, 2013); // mktime(hr,mins,sec,mth,day,yr) $expiry_timestamp3 = mktime(23, 35, 11, 6, 29, 2013); // mktime(hr,mins,sec,mth,day,yr) if($current_timestamp < $expiry_timestamp1) { // insert content here that you want showing as long as the current_timestamp is less than the expiry_timestamp. echo "This is within the deadline 1"; } if($current_timestamp < $expiry_timestamp2) { // insert content here that you want showing as long as the current_timestamp is less than the expiry_timestamp. echo "This is within the deadline 2"; } if($current_timestamp < $expiry_timestamp3) { // insert content here that you want showing as long as the current_timestamp is less than the expiry_timestamp. echo "This is within the deadline 3"; } // insert a message which shows that the content is now hidden. else { echo "This is not"; }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.