0

I am using Hostgator to create a simple website where the user can upload pictures online. The HTML and CSS code works fine however the server connection failed.

<?php

$servername = "localhost:3306";
$username = "brazen_test_gallary";
$password = "1234";
$dbname = "brazen_galleryexample";


$conn = mysqli_connect($servername, $username, $password, $dbname);

After I refresh my page, I get the following errors:

Warning : mysqli_connect(): (HY000/2005): Unknown MySQL server host 'localhost:3306' (0)

Funk Forty Niner
  • 74,450
  • 15
  • 68
  • 141
brazencore
  • 17
  • 7

0 Answers0