Forum Moderators: open

Message Too Old, No Replies

Dreamweaver and DB connections!

         

ThreeD

9:10 am on Mar 26, 2006 (gmt 0)

10+ Year Member



Short and simple... I've noticed that Dreamweaver puts the DB connection code directly in the php files. How secure is it to store the database connection username/password in every file when a db connection is needed when displaying data directly from the database? I know that a browser won't display the username/password or any of the connection code, but shouldn't the connection data be stored in a seperate file that is not that easily accessible?

Any reply is appreciated! :) thanks in advance

mcvoid

6:28 pm on Mar 30, 2006 (gmt 0)

10+ Year Member



Not really, in my opinion.
PHP is a server-side scripting language, so all of the processing is done on the server with all the code executed and removed before the server even sends it down good ol' port 80. Nobody, with the exception of someone logged on to and using the server, will be able to see a single scrap of that database code.
That's one of the advantages of PHP - preprocessed scripting inline with HTML. So- keep it up as it is to your heart's content because it can't really get any more secure, even with the code in a separate file.

ThreeD

5:59 pm on Apr 3, 2006 (gmt 0)

10+ Year Member



thanks for the info mcvoid, appreciate the feedback!