All-wise and knowing DP, I need your help. On a form, I have an option in a drop-down menu that reads "Flexible Date". When someone selects that option, I need it to record to the database (Coldfusion if its relevant) as Today's Date + 30 days. In other words, let's say today is Oct. 1st and the user select "Flexible Date". When they submit the form, it should be recorded in the database as Oct. 31st. Any ideas on how this can be done? Thanks! *Mods, please change the title to How Do I Record "Today's Date + 30 Days" to a Database?*
Try something like this $date = date('Y-m-d', strtotime('+ 30 days')); (this should work but im away from my devleopment box sorry )
A more efficient option would be $date = time() + 43200; (I don't frequently work with time so I may be overlooking something). Edit: Haha.. How did I mess up that calculation? The above number should be 2592000 - thanks krakjoe. However it appears my comment is entirely useless because I'm talking in the wrong language. Whoops.
there are 86400 seconds in a day, you're sort of overlooking that .... also the user said he's using ColdFusion ...