Advertisement
tiunu

Untitled

Jan 28th, 2017
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. <?php
  2.  
  3. $username = "root";
  4. $password = "";
  5. $database = "map";
  6.  
  7. // Opens a connection to a MySQL server
  8. $connection=@mysql_connect('localhost', $username, $password);
  9. if (!$connection) {
  10.   die('Not connected : ' . mysql_error());
  11. }
  12.  
  13. // Set the active MySQL database
  14. $db_selected = mysql_select_db($database, $connection);
  15. if (!$db_selected) {
  16.   die ('Can\'t use db : ' . mysql_error());
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement