Jump to content

Recommended Posts

My objective is the following:

 

I want to only allow  user to login to a survey only ever 2 weeks and also when it is open, only have it accessible for 4 days.

 

Completed so far:

I have it set with a bunch of if's that it'll update a MySQL database with the appropriate date. I grab the local day of the month from the users PC, then add 14 and/or 4 to get my disable/activate dates. Everything updates fine in the DB.

 

My problem is this: When I get a date, take today for instance March 20th, and add 14 days to it, it shouls bring it to April 3rd. But when I add the 14 to the 20 of course it comes up to 34.

 

How can I add the 14 days, and have it come up with the right date?

 

Let me know if there is anything I can post or add to help with this.

 

Thanks.

 

Kevin

 

 

Link to comment
https://forums.phpfreaks.com/topic/43479-solved-dates-in-the-future-help/
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.