Wickham Posted October 29, 2009 Report Share Posted October 29, 2009 If this is the PHP date format: echo date("d M Y"); how do I add 2 days to the current date? If it's 31 December 2009 I don't want 33 December 2009. Presumably I have to create variables for p and M and Y and add 2 days to d and then check if it goes beyond the month and year somehow. Quote Link to comment Share on other sites More sharing options...
Wickham Posted October 29, 2009 Author Report Share Posted October 29, 2009 Sorry, I'm answering my own post again, I've found a way to do it:- $day2 = mktime(0,0,0,date("m"),date("d")+2,date("Y")); and in the processing part of the PHP:- if($State == "NY") { echo "$FirstName $LastName - we will get back to you within 2 days, ie before " .date("d M Y", $day2); exit; } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.