hi Gurus i am developing a learning application in php. in that system user can buy 1to 6 learning package for 1 year. so after 1 year he/she will be stoped. from the date of buying the package to 1 year of the package. how will i do this? can any body help me.???
hi, If all the learning packages are given as data to read from your site or it can be downloaded ? If you allow your user to read these documents from your site. Then store there date of purchace in one field and their expire period in another field. Now, when user comes to the documents links page .First check whether the user have purchached it or not. Second check for expire date(check whether current date is greater than expire date).If so, show the documents, link. If not show a text that your validity expires.
There is so simple way to do that.. First set the time of expiry to 1 year whenever user purchases a package. Obviously you'll store this in database. And in the page of viewing that package or whatever, set the script to fetch out the expiry date. If the expiry date hasn't reached yet show the page that he can access else notify him that the package expired. You can also show a reverse counter showing the days left for the expiry of the package.
i would do it by adding the user that bought a package to the db with name date etc. everytime he would log in, the script would check if the 1 year has passed or not, then allow or disallow him the privilage of viewing the content.