PHP code to establish a connection with MySQL : Database Connection : MySQL Database PHP Source Code


PHP Source Code » MySQL Database » Database Connection »

 

PHP code to establish a connection with MySQL




  <?php
  $host="mysql153.secureserver.net";
  $uname="navioo";
  $pass="password";
  
  $connection= mysql_connect ($host, $uname, $pass);
  if (! $connection) {
    die ("A connection to the Server could not be established!");
  else {
    echo "User root logged into to MySQL server ",$host," successfully.";
  }
  ?>



           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo MySQL Database
» Database Connection