The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Database Connection

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #27507

    I am learning about php/mysql at 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.

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.