I need to set a datetime stamp to an arbitrary number of days in the future (to the minute) set by the user, i.e. Add 5 days to now. I'm going to save this future date in my database.
Then, when they hit a certain page in the future I need to pull that value and see if the current time, (down to the minute, not second) is before or after the datetime they entered.
I am not sure in what format to store the datetime stamp in order to do the comparison later.
And how do you compare datetime stamps?
Here is what I've got so far:
Code: Select all
echo date('Y-m-d-H-i', strtotime("+2 days"));Thanks!