Hello I and my friend tried to create a website with Player Stats, but we have problem with connection to Database
Hosting: Nitrado.net
Error:
(The code is my friend, not my)
(My friend try with port and without port)
I have checked Zugriff von externen Netz erlauben on the hosting what means Allow access from external network
Someone had a problem like this? I wait for answer. Greetings
Hosting: Nitrado.net
Error:
Code:
Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL server on 'ms492.nitrado.net' (111) in /home/ngpepoch/public_html/connect.php on line 8
Can't connect to MySQL server on 'ms492.nitrado.net' (111)
(The code is my friend, not my)
(My friend try with port and without port)
Code:
[LIST=1]
[*]<?php
[*]$host = 'ms492.nitrado.net';
[*]$user = 'ni382305_3_epoch';
[*]$pass = 'xxxx';
[*]$name = 'ni382305_3_epoch';
[*]$port = '3306';
[*]
[*]$link = mysql_connect($host, $user, $pass) or die(mysql_error());
[*]mysql_select_db($name, $link) or die('Nie znaleziono bazy danych o takiej nazwie.');
[*]mysql_query("SET NAMES 'utf8'");
[*]
[*]function vtxt($var)
[*]{
[*] return trim(mysql_real_escape_string(strip_tags($var)));
[*]}
[*]
[*]function row($sql)
[*]{
[*] return @mysql_fetch_assoc(mysql_query($sql));
[*]}
[*]
[*]?>
[/LIST]
I have checked Zugriff von externen Netz erlauben on the hosting what means Allow access from external network
Someone had a problem like this? I wait for answer. Greetings