Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $servername = "localhost";
- $username = "lopik1484497160";
- $password = "Muv660Kv";
- // Create connection
- $conn = new mysqli($servername, $username, $password);
- // Check connection
- if ($conn->connect_error) {
- die("Connection failed: " . $conn->connect_error);
- }
- echo "Connected successfully";
- // this will avoid mysql_connect() deprecation error.
- error_reporting( ~E_DEPRECATED & ~E_NOTICE );
- // but I strongly suggest you to use PDO or MySQLi.
- define('DBHOST', 'localhost');
- define('DBUSER', 'lopik1484497160');
- define('DBPASS', 'Muv660Kv');
- define('DBNAME', 'lopik1484497160');
- $conn = mysql_connect(DBHOST,DBUSER,DBPASS);
- $dbcon = mysql_select_db(DBNAME);
- if ( !$conn ) {
- die("Connection failed : " . mysql_error());
- }
- if ( !$dbcon ) {
- die("Database Connection failed : " . mysql_error());
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement