Jump to content

[SOLVED] Dates in the Future Help


kevin4it

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

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.