Storing Site Global Variables

hbb17

New Member
Quick question - I'm trying to decide the best way to store some site variables. I would like build a "control panel" type feature into my site where I can chose settings and they will be reflected throughout my site. For example - I have one item I'm selling and it has a price (and a picture to display the price). I would like to be able to set this global variable from a custom backend page instead of having to go and change the img src etc.. What is the best way to go about doing this? At first I thought a DB table but then surely it would be a slow(ish) way of accessing only a handful of site variables? I also thought about a file, but was wondering how I would go about overwriting the correct bit when values change etc.Using your expertise, please could you recommend an avenue to go down (if there is a favourable method), many thanks! (I'm using the Yii framework if anyone else uses it too).
 
Back
Top