studgate Posted March 10, 2008 Share Posted March 10, 2008 Hi Guys, I have a small problem. I am trying to create an expiration date for a form meaning that after a certain date, people will no longer be able to register anymore. Anybody knows of a way to do that or a tutorial that can help me with that? For example, I have an event that start in April 1st and people can register now to March 26th, after the 26th the registration will echo an error message or become inactive. Thanks in advance guys! Quote Link to comment Share on other sites More sharing options...
p2grace Posted March 10, 2008 Share Posted March 10, 2008 You would simply do a check prior to showing the form. If the current date is within the allowed registration time then show the form, if it isn't show the message. Simple Example: $date = date("Ymd"); if($date < "20080315"){ // assuming you want it to close on March 15, 2008. You can set this to whatever you want // show form }else{ // hide form } Quote Link to comment Share on other sites More sharing options...
studgate Posted March 10, 2008 Author Share Posted March 10, 2008 Thanks p2grace, I am going to try that and see what I get. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.