Grow your CSS skills. Land your dream job.

Database Connection

  • # January 12, 2010 at 7:21 pm

    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?

    # January 12, 2010 at 8:27 pm

    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)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".