PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Firstly, you can't just add and subtract dates like you can numbers. Instead, you must use strtotime() to make the changes, date() can then be used to format the results. Look up both of these functions and specifically the examples for strtotime(). Also you can retrieve the current datetime with strtotime('now') you don't need to use MySQL, in fact using MySQL will be significantly slower and less cool.