I need a simple code to show that the ad has expired. Any help will be appreciated!

Discussion in 'PHP' started by qwikad.com, Oct 2, 2012.

  1. #1
    I have a variable called expireson

    I need a code that would go like this:

    if expireson is today or any day after the expireson show "this ad has expired"



    Can anyone help me with this?
     
    Solved! View solution.
    qwikad.com, Oct 2, 2012 IP
  2. #2
    if (strtotime($expireson) <= time()) {
        
        echo "This is your expired ad message!";
    
    }
    PHP:
    Depending on what is the date format you are using, you can adjust the first if statement argument/function.
     
    Web Solutions, Oct 2, 2012 IP
  3. qwikad.com

    qwikad.com Illustrious Member Affiliate Manager

    Messages:
    7,373
    Likes Received:
    1,720
    Best Answers:
    31
    Trophy Points:
    475
    #3
    I had to tweak with it for a little, but yes, that's what I needed. Thank you!
     
    qwikad.com, Oct 2, 2012 IP