Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Connecting to the database using mysqli

<?php

$servername = "localhost";
$username = "username";
$password = "password";
$database = "database";

// Create connection
$conn = new mysqli($servername, $username, $password, $database);

// Check connection
if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}
echo "Connected successfully";
?>
Source by www.000webhost.com #
 
PREVIOUS NEXT
Tagged: #Connecting #database #mysqli
ADD COMMENT
Topic
Name
2+5 =