September 5, 2016

PHP - MariaDB database connection.



Hello everyone, this this simple way to connect MariaDB with PHP,

Here I explain with simple example.

Example:

<?php
$connection=mysqli_connect("hostname","username","password");
$db = mysqli_select_db("databasename");
if (mysqli_connect_errno())
{
echo "Connection Failed with MariaDB:" . mysqli_connect_error();
}
?>

Enjoy!


No comments:

Post a Comment

Integrating Google reCAPTCHA v3 in HTML Form with PHP

  What is Google reCAPTCHA v3? Google reCAPTCHA is a free service that helps protect websites from spam and abuse. reCAPTCHA v3 is the lates...