Advertisement
Guest User

Untitled

a guest
May 14th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.62 KB | None | 0 0
  1. <?php
  2.     //Set strings for host, user, password and database name for access to
  3.     //the database.
  4.     $dbHost='localhost';
  5.     $dbUser ='root';
  6.     $dbPassword='112358destiny';
  7.     $dbName='DainDev_DB';
  8.    
  9.     //Connect to the database server.
  10.     $dbCon = @mysql_connect($dbHost, $dbUser, $dbPassword);
  11.         if(!$dbCon){
  12.             echo("<p>Cannot conect to the database server.</p>");
  13.             exit();
  14.         }
  15.    
  16.     //Connect to the database.
  17.     mysql_select_db($dbName, $dbCon);
  18.     if(!@mysql_select_db($dbName)){
  19.         echo("Cannot locate ".$dbName." database.</p>");
  20.         exit();
  21.     }
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement