Skip to content Skip to sidebar Skip to footer

Database Connection To Live Site

I'm currently building an online booking form as a project and once the user hits the submit button it sends an email with the details to a specified email and stores everything in

Solution 1:

Ask service provider for username and password and export sql file and upload then,ask them for run sql file and then try to connect database live.

<?php
$con = mysqli_connect("localhost","my_user","my_password","my_db");

// Check connection
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
?>

Post a Comment for "Database Connection To Live Site"