I am learning about php/mysql at lynda.com and I just finished a lesson about Accessing data in MySQL with PHP. It said nothing about securing this data. It required to write this piece of code: $connection = mysql_connect("localhost", "root", "Php20sql"); if (!$connection) { die("Database connection failed: " . mysql_error()); }
This shows the password for the database. If this was a live database how would I go around not showing this password that someone else might find?
Well if you are visiting a website you can't actually see the php code behind it. Try to see the php code which runs css-tricks, it can't be done (or else tell me how :P )
So you can't see what the developer entered as Mysql data . Only if he posts a code snippet or his php file somewhere where others can read it and forgets to remove the password ... but thats a human error.
if (!$connection) {
die("Database connection failed: " . mysql_error());
}
This shows the password for the database. If this was a live database how would I go around not showing this password that someone else might find?
So you can't see what the developer entered as Mysql data . Only if he posts a code snippet or his php file somewhere where others can read it and forgets to remove the password ... but thats a human error.