Adrian Adrian - 6 months ago 24
MySQL Question

is my database password exposed when I connect using php?

I just started reading up on PHP with mySQL, and I am just on the first page ( and it says that I connect to my database within my PHP code by supplying my username and password.

My question is, would this not leave my password exposed for anyone to then access my database?

Now I have not learned yet if this connection code is written in a separate php file, or in php inbedded into my html code, but aren't all my files (php, css, js), all available anyways; otherwise how would people's browsers be able to see the results?


Answer Source

No. PHP is processed on the server-side, and is never sent (insecure application not withstanding) to the browser. You might also check out CodeAcademy's PHP track. I think that would probably be a better guide for you!

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download