Guest User

Untitled

a guest
Jan 27th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. <?php
  2. $username = "username";
  3. $password = "password";
  4. $hostname = "hostname";
  5. $dbname = "dbname";
  6.  
  7. //connection to the database
  8. $dbhandle = mysql_connect($hostname, $username, $password) or die("Unable to connect to MySQL");
  9. echo "Connected to MySQL using username - $username, password - $password, host - $hostname<br>";
  10. $selected = mysql_select_db("$dbname",$dbhandle) or die("Unable to connect to MySQL DB - check the database name and try again.");
  11. ?>
Add Comment
Please, Sign In to add comment