Jump to content

Help with Registration Form Expiration Date


studgate

Recommended Posts

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!

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
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.