I am trying to do some coding and I've taken a free webhost for that.
$servername = "127.0.0.1";
$username = "ltm_23041946";
$password = "pass_wass_heree";
$dbname = "ltm_23041946_a";
$conn = new mysqli($servername, $username, $password, $dbname);
Is my code, but I get multiple errors with this. Here are my errors;
Warning: mysqli::__construct(): (HY000/2002): Connection refused in >/home/vol14_2/ultimatefreehost.in/ltm_23041946/htdocs/create.php on line 12
Notice: Undefined variable: conn in >/home/vol14_2/ultimatefreehost.in/ltm_23041946/htdocs/create.php on line 18
Fatal error: Uncaught Error: Call to a member function query() on null in >/home/vol14_2/ultimatefreehost.in/ltm_23041946/htdocs/create.php:18 Stack >trace: #0 /home/vol14_2/ultimatefreehost.in/ltm_23041946/htdocs/create.php(51): >insert('a', 'md2') #1 {main} thrown in >/home/vol14_2/ultimatefreehost.in/ltm_23041946/htdocs/create.php on line 18
I searched around trying to get answers, but I am still stuck with this. If anyone could help, I would be thankfull!
$conn->query($sql);
is line 18 – minecraft account