connect php mysql procedural way

Solutions on MaxInterview for connect php mysql procedural way by the best coders in the world

showing results for - "connect php mysql procedural way"
Victoria
27 Jun 2016
1<?php 
2$servername = "localhost";
3$username = "root";
4$password = "";
5$database ="user_online_app"; 
6
7// Create connection
8$conn = new mysqli($servername, $username, $password,$database);
9
10// Check connection
11if ($conn->connect_error) {
12    die("Connection failed: " . $conn->connect_error);
13}
14