rootKID Posted October 28, 2013 Share Posted October 28, 2013 (edited) Okay, i might have asked about this in the past, but could not find my post (lol), so asking again. Hope this is ok x). I have a function at my home-desktop called (GetDate()). It is supposed to get the date of a news group in the database. This means if a ADMIN account on my website writes a new (Latest News) article, the function are meant for getting a normal time() function in the database, and from that telling me when the admin wrote this Latest News article. Now, if i wish to use something similar to a month ahead, like on a hosting bill (éxample). If a user has bought a website hosting-plan at my server, and i store the current time() in the database (when it was bought). How would an example be to output +1 month ahead? So the user knows when the next bill comes? What i am aiming for here are something similar to this: You paid the bill on 28-10-2013, the next bill will be set to be paid at 28-11-2013 Hope you get the point of what i am trying to do here. Sorry for my bad english right now, in a hurry and writing from my school.. so does not really has time to perfect into details as i usually does x)... But any questions, do not hesitate to ask away . NOTE: i will update the post later and add in my function so you can see what i am talking about . Hope you guys have some ideas etc ... -rootKID Edited October 28, 2013 by rootKID Link to comment Share on other sites More sharing options...
justsomeguy Posted October 28, 2013 Share Posted October 28, 2013 If you use the DateTime class in PHP then you can use the add method to add any amount of time. http://www.php.net/manual/en/datetime.add.php Link to comment Share on other sites More sharing options...
rootKID Posted November 6, 2013 Author Share Posted November 6, 2013 Hey, sorry for late reply! Been busy at schools and stuff. Mostly schools (GOD i hate math! )... But thanks! Will take a look later when i get home -rootKID Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now