Skip to content

Instantly share code, notes, and snippets.

<?php
$servername = "mysql.hostinger.com";
$database = "u266072517_name";
$username = "u266072517_user";
$password = "paswordhere";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $database);
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'u694443746_aujev');
/** MySQL database username */
define('DB_USER', 'u694443746_vaven');
/** MySQL database password */
define('DB_PASSWORD', 'zuWupEXEdu');
<?php
$servername = "mysql.hostinger.com";
$database = "u266072517_name";
$username = "u266072517_user";
$password = "buystuffpwd";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $database);
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" type="text/css" href="http://www.mywebsite.com/stylesheet.css" media="screen">
</head>
<body>
</body>
</html>
<?php
$servername = "mysql.hostinger.com";
$username = "u266072517_user";
$database = "u266072517_name";
$password = "buystuffpwd";
// Create a new connection to the MySQL database using PDO
$conn = new mysqli($servername, $username, $password);
// Check connection
<?php
$servername = "mysql.hostinger.com";
$database = "u266072517_name";
$username = "u266072517_user";
$password = "buystuffpwd";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $database);
$my_Object = new OBJECT();
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";