title: Can't connect to MySQL database via hostinger.com
body: <p>I am trying to connect to mysql database through phpmyadmin on my <strong>hostinger.com</strong> account, but everytime i signup to my form that created, the data that i entered doesnt go to my database (ive done it on my xampp server, so im sure i didnt do anything wrong) also i have changed the database username, name, host and password from:</p>
  
  <pre><code>&lt;?php
  
  $dbServername = "localhost";
  $dbUsername = "root";
  $dbPassword = "";
  $dbName = "loginsystem";
  
  $conn = mysqli_connect($dbServername, $dbUsername, $dbPassword, $dbName);
  ?&gt;
  </code></pre>
  
  <p>to</p>
  
  <pre><code>&lt;?php
  
  $dbServername = "serverexample.hostinger.com";
  $dbUsername = "u123456789_username";
  $dbPassword = "password";
  $dbName = "u123456789_name";
  
  $conn = mysqli_connect($dbServername, $dbUsername, $dbPassword, $dbName);
  ?&gt;
  </code></pre>
  
  <p>and still it didnt work, i also tried searching for a database connection tester which is this:</p>
  
  <pre><code>&lt;?php
  # Fill our vars and run on cli
  # $ php -f db-connect-test.php
  
  $dbname = 'u123456789_name';
  $dbuser = 'u123456789_username';
  $dbpass = 'password';
  $dbhost = 'serverexample.hostinger.com';
  
  $connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
  mysql_select_db($dbname) or die("Could not open the db '$dbname'");
  
  $test_query = "SHOW TABLES FROM $dbname";
  $result = mysql_query($test_query);
  
  $tblCnt = 0;
  while($tbl = mysql_fetch_array($result)) {
    $tblCnt++;
    #echo $tbl[0]."&lt;br /&gt;\n";
  }
  
  if (!$tblCnt) {
    echo "There are no tables&lt;br /&gt;\n";
  } else {
    echo "There are $tblCnt tables&lt;br /&gt;\n";
  }
  </code></pre>
  
  <p>and it shows me this: <a href="http://u920040733.hostingerapp.com/" rel="nofollow noreferrer">http://u920040733.hostingerapp.com/</a></p>
  
  <p>EDIT: The problem was the server name, it should be localhost XD.</p>