How to create an expiration date?

This is a discussion on "How to create an expiration date?" within the PHP Forum section. This forum, and the thread "How to create an expiration date? are both part of the Program Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > PHP Forum

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Sep 10th, 2007, 18:19
Up'n'Coming Member
Join Date: Jul 2006
Location: manila
Age: 29
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
How to create an expiration date?

hello, anybody that knows how to create an expiration date?

eg: At September 31, 2007 on that day, it will expire....

thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Sep 10th, 2007, 18:53
Rakuli's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Australia
Age: 24
Posts: 956
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to create an expiration date?

What would be expiring?

You could check using something like

PHP: Select all

$expiry "August 31 2007"// US date format
 
 
// Check the expiry converted to a timestamp against the current timestamp
if (time() > strtotime($expiry))
    echo 
'Expired!';
else
    echo 
'You can drink that milk, it\'s still good'
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Sep 10th, 2007, 22:47
alexgeek's Avatar
Moderator
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,814
Blog Entries: 9
Thanks: 2
Thanked 3 Times in 3 Posts
Re: How to create an expiration date?

i think he means,
you know when you fill in a form,
and the page is created dynamically,
and when you realise you need to go back,
you get an annoying page to tell you the page has expired -_-
__________________
Web Design and Development Blog

Alex Perry
Technical Administrator.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Sep 10th, 2007, 22:55
Highly Reputable Member
Join Date: Dec 2006
Location: Norwich
Posts: 726
Blog Entries: 4
Thanks: 6
Thanked 2 Times in 2 Posts
Re: How to create an expiration date?

could i use that code on a artical on my blog.
Last Blog Entry: Whats your Niche? (Jun 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Sep 10th, 2007, 23:09
alexgeek's Avatar
Moderator
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,814
Blog Entries: 9
Thanks: 2
Thanked 3 Times in 3 Posts
Re: How to create an expiration date?

Quote:
Originally Posted by simonb View Post
could i use that code on a artical on my blog.
I guess,
I don't know the code but i can the downside that it won't get indexed by search engines
__________________
Web Design and Development Blog

Alex Perry
Technical Administrator.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Sep 10th, 2007, 23:16
Highly Reputable Member
Join Date: Dec 2006
Location: Norwich
Posts: 726
Blog Entries: 4
Thanks: 6
Thanked 2 Times in 2 Posts
Re: How to create an expiration date?

no i mean teach people that code and so them
Last Blog Entry: Whats your Niche? (Jun 10th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Sep 10th, 2007, 23:20
alexgeek's Avatar
Moderator
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,814
Blog Entries: 9
Thanks: 2
Thanked 3 Times in 3 Posts
if you know the code you could teach it.

found this:
Quote:
To expire the content immediately after viewing, use the code: Code:
<meta HTTP-EQUIV="Expires" CONTENT="0">
__________________
Web Design and Development Blog

Alex Perry
Technical Administrator.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)

Last edited by Webforumz Staff; Sep 11th, 2007 at 23:26. Reason: Merged Posts!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Sep 11th, 2007, 04:15
Up'n'Coming Member
Join Date: Jul 2006
Location: manila
Age: 29
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to create an expiration date?

thanks for the reply guys, what if a coupon has expired on the date given and it will automatically removed or moved to archived

is there a script on it..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Sep 11th, 2007, 09:11
Reputable Member
Join Date: Jun 2007
Location: uk
Posts: 459
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How to create an expiration date?

heres an interesting thread on the use of coupons. I dont know if its relevant to you, if it is it has some interesting info.

http://forum.abestweb.com/showthread.php?t=90797
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
expiration date

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help on how to create a date search? degirogio ASP.NET Forum 2 Mar 29th, 2007 18:22
Changing date format in date picker AdRock JavaScript Forum 1 Aug 1st, 2006 18:16
Date in Asp Gup Classic ASP 1 Jun 5th, 2006 10:05
asp date Monie Classic ASP 1 Sep 21st, 2004 05:38
Date Validation señorbadger JavaScript Forum 1 Nov 17th, 2003 20:48


All times are GMT. The time now is 01:10.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved