Welcome Guest, Not a member yet? Register   Sign In
Change DB config
#6

(08-01-2018, 11:42 PM)arber.smajli Wrote: Thank you for your message

I see what you mean but it's not what I search.

I will try to explain you differently ;

I am making a database monitor, so to acces to the page, the admin have to connect to the database.

So, in first case, the database configuration (application/config/database.php) is empty.

And if the admin enter the correct username/passeword (of the database) he is loged on.

This is what I can't do for the moment, write in application/config/database.php from a controller.

So if anyone has an idea, it would be cool.

I understand what you are saying.  There are many approaches that you an take.  I will give you two off the top of my head...
  1. You could create a library/script that will automatically update the config file adding the new connections details.  Also, the script should be able to remove them as well.
  2. You could create a library/script that will use the default PHP connection string and encypt and save the database login information as it is added by the user.
And I'm quite sure others may have other suggestions.
Reply


Messages In This Thread
Change DB config - by arber.smajli - 07-31-2018, 05:55 AM
RE: Change DB config - by php_rocs - 07-31-2018, 10:06 AM
RE: Change DB config - by arber.smajli - 08-01-2018, 11:42 PM
RE: Change DB config - by php_rocs - 08-02-2018, 08:16 AM
RE: Change DB config - by InsiteFX - 08-02-2018, 03:49 AM
RE: Change DB config - by arber.smajli - 08-02-2018, 03:58 AM



Theme © iAndrew 2016 - Forum software by © MyBB