Jump to content

Help with Time Function


choskins102

Recommended Posts

Hello,

I need help with a little problem on my site.

 

Here's what I want to do. When a user on my site decides to join an activity, they have to register for that activity. Once they do, they will be added to a list of other people who have joined the same activity. However, I want there to be a required 8 hour waiting period from the time the person joins, to the time the person is official active.

 

Basically, there will be a table of all members of this activity that will look something like this:

 

 

Name        | E-mail                | Eligibility

-------------------------------------------

John Doe    | jdoe@email.com  | eligible_image.jpg

-------------------------------------------

John Doe 2 | jdoe2@email.com | ineligible_image.jpg

 

 

For the sake of argument, the two eligibility images would be a check mark for eligible, and an X mark for ineligible.

 

How do I get the server to recognize when 8 hours have passed and change the X mark to a check mark?

 

I am using PHP and MySQL on my site so the script should be able to fit with that.

Link to comment
Share on other sites

Well, first thing that comes to my mind is have a column in your members table that represents the time they registered. And when the user tries to access the activity on your website, have it check that column.

 

If that column + 8 hrs is a time before the current time, let him through (maybe even have another column that respresents whether they are eligible or not, and have that updated when your app looks him up).

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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