I know the title is misleading. I am working on a class project where we are trying to setup a notification system written in PHP and using an MySQL database. We are trying to set-up a notification page that will show what users are nearing expiration. The expiration dates are entered in manually and are not a timestamp. The dates are entered in on another page into the SQL database. Then what we need is to be able to take those dates and find that if they are near (lets say) 7 months to the date entered then it displays the users name that is about to expire.
I have tried different combinations of date(), strtotime(), date(mktime()), dateadd(), strftime(), etc.... and have been unsuccessful. All of those functions work if the date is physically a part of the code or off of the current time. But for some reason I cannot get it to subtract from a date in the database without it returning 12-31-1970.
Any and all help is greatly appreciated and thanks in advance.
(also sorry for the long post, just wanted to be thorough)
I have tried different combinations of date(), strtotime(), date(mktime()), dateadd(), strftime(), etc.... and have been unsuccessful. All of those functions work if the date is physically a part of the code or off of the current time. But for some reason I cannot get it to subtract from a date in the database without it returning 12-31-1970.
Any and all help is greatly appreciated and thanks in advance.
(also sorry for the long post, just wanted to be thorough)
Comment