Advertisement
AMONRA75

PHP - MYSQL CONNECT PHP 6>

Oct 15th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. // 1. Create a database connection
  2. $connection = mysqli_connect("127.0.0.1","root","*****");
  3. if (!$connection) {
  4.     die("Database connection failed: " . mysqli_connect_error());
  5. }
  6.  
  7. // 2. Select a database to use
  8. $db_select = mysqli_select_db($connection, "betfair");
  9. if (!$db_select) {
  10.     die("Database selection failed: " . mysqli_error($connection));
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement