Hi, I'm a newb in PHP. Here is what I am trying to accomplish:
- Have a variable to iterates by 1 every time a form submitted.
- Be able to show this variable on any page of my site at any time
- Be able to reset the variable when needed
I basically need several variables like this one, which would be static - and this one variable which would need to change every time a form is submitted.
How can this be done in a secure fashion? I know there are ways to store variables in a txt file or on a database.. which is better/more secure?
to give a little bit of context - I'm trying to create a site like groupon.com, where the sales counter increases every time an item is bought, and the number of items bought in a given day can be displayed on the site. In addition, I will have other variables to handle the price, and other static values which would need to be displayed, but also changed periodically.
Anyone have any thoughts on an efficient and secure way of accomplishing this?
Thanks!!!