âš ī¸ Warning âš ī¸ Deprecated Code! This video tutorial contains outdated code.
💡 If you wish to update it, any AI assistant will update the code for you in seconds.

Database Creation and PHP MySQLi Connection Script Tutorial

Published : November 21, 2014   •   Last Edited : November 24, 2025   •   Author : Adam Khoury

Learn to create the Database on your host and write a modular PHP script for establishing connection to that database using the improved MySQLi extension. PHP and MySQL are the core data processing technologies of most popular social networking websites.

<?php
$db_conx = mysqli_connect("localhost", "worldoi5_adam", "xxxxxxxx", "worldoi5_social");
// Evaluate the connection
if (mysqli_connect_errno()) {
    echo mysqli_connect_error();
    exit();
} else {
	echo "Successful database connection, happy coding!!!";
}
?>