chopps Posted May 17, 2010 Share Posted May 17, 2010 I am trying to create an application that uses three separate database users for their connection strings. One for the public site, one for logged in users, and one for the administrative users. The logic behind this is that limited permissions would be give to the public user for the mysql database, more permissions to the logged in users, and full control to the admins. Hopefully this would limit the damage incurred if a sql injection was to be pulled off successfully and since it uses a particular user it would help isolate the injection point. However, I am having some trouble putting this into action and wanted to know if anyone here had any suggestions for me or reasons why this shouldn't be done. The way I see it I just need three separate config files to specify the different usernames and passwords but I'm not sure what the best way to integrate this into the code. Could I just used some nested if...else statements or would it be best to use the switch case? Any suggestions or insight into this matter would be much appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/202002-using-separate-connection-strings-for-certain-functions/ 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.