Adrian
Adrian

Reputation: 47

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 (http://php.about.com/od/phpwithmysql/ss/mysql_php.htm) 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?

Thanks, -Adrian

Upvotes: 0

Views: 112

Answers (2)

Connor Peet
Connor Peet

Reputation: 6265

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!

Upvotes: 2

Abraham K
Abraham K

Reputation: 634

Php is server side language. It runs on your server so it wont be visible. (Unless you use any echo's or print ) :D

Upvotes: 0

Related Questions