Results 1 to 2 of 2
Thread: storing user settings?
Nov 20, 2004, 16:02 #1
storing user settings?
I'm coding this website where people need credits to do stuff on the site. They have to buy the credits as you guessed.
The client wants to have an admin panel where he can change the price of the credits, e.g if the price of 1 credit is 1 cent, 100 credits would be a dollar. The client wants to be able to change the price of this 1 credit in future. Also he wants to be able to specify a "processing fee" to the transaction. For example, he wants to specify 3.5% of the total cost of the credits + .35 as the processing fee, if the money is being paid through PayPal, and wants to be able to change that in future.
How can I store all of these settings? I know I could use a seperate table in a MySQL database but I feel there's no point of it, and that there must be an easier way. I want to store this information in such a way that I could simply read from a file / include it and I'd be able to not only get the values of these settings but also change them. Please give me some suggestions on how to do that, or tell me how you store the settings in your php apps?
Nov 20, 2004, 17:43 #2
- Join Date
- Dec 2003
- Federal Way, Washington (USA)
- 0 Post(s)
- 0 Thread(s)
In my opinion, there is no easier way of storing this information than in a table within your database. You could store it in a text file, but that wouldn't make it any easier to retrieve and/or update the data; in fact, it would probably make it more complicated.
As far as maintaining the data itself, you probably want to have a screen with the updateable data and give access to that screen via some sort of authentication system.
Hope this helps.