c_shelswell Posted May 12, 2009 Share Posted May 12, 2009 Hi I've got a constants page that holds the vat percentage plus a number of other things. I'd like to allow a user to edit VAT but nothing else. Is there a good way to do this in php? Or am i really better to create a single mysql table to hold that one bit of data? Cheers Quote Link to comment Share on other sites More sharing options...
ILMV Posted May 12, 2009 Share Posted May 12, 2009 I would create a new MySQL table named options, with the field id, name and value. This way you would be able to extend it at a later date. ILMV Quote Link to comment Share on other sites More sharing options...
c_shelswell Posted May 12, 2009 Author Share Posted May 12, 2009 yeah thing is there shouldn't be a reason to ever add more accounts to it. Is literally just the vat that I want to allow them to edit. Cheers Quote Link to comment Share on other sites More sharing options...
ILMV Posted May 12, 2009 Share Posted May 12, 2009 Well the database option is certainly the choice I would go for, mainly because could be problems parsing the settings file if it wasn't constructed correctly. Quote Link to comment Share on other sites More sharing options...
c_shelswell Posted May 12, 2009 Author Share Posted May 12, 2009 Fair point. Think it would have been better if i'd thought this through at the start Oh well lesson learnt. Cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.