is my database password exposed when I connect using php?

Adrian

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

Connor Peet

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!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

I cant connect to my MYSQL Database using Php

Do i use my login username and password when trying to connect to a somee.com database?

PHP Exits When I Try to Connect to a Database Using MySQLi

How can I connect my Android app to Amazon RDS MySQL Database using Php?

Why am I unable to connect to my database in PHP?

How do I Connect to My Database Server Using MySQL Workbench?

Failed to connect to database server. How do I connect to a database that is not on my localhost using powershell and integrated security?

When I try to echo data from database using php my html page breaked

NoClassDefFoundError when using Exposed

When does PHP connect to the database?

How i can connect my server to the tally using PHP

Can't connect to my MySQL database using PHP mysqli_connect()

Unable to connect to database using PHP

xxamp connect to database using php

I receive: firebase.database is not a function error when trying to connect my form to the database

I can not connect to my server sftp with ssh2_auth_password in php , but this work if I use FileZilla. This is my code :

I cannot seem to connect my PHP page to my SQL test server and database

How to store username and password details from my app to my database and how to connect my app with my database?

I can't change my database password

I'm trying to update my password in oracle database using Java. Am I doing something wrong?

How can I grant access of my database to a user with a certain username and password which I am not using?

Confusing error when I query my MySQL database with PDO PHP

Using Password Recovery control with my own database

How do I specify a Diesel DATABASE_URL when my password contains an at-sign (@)?

Hard time to connect to my database with php

my php code to connect with database for android

PHP OPP - My first try to connect on database

How i display my database list using pagination in php

springboot,Can't connect to my database java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)