I'm using 000webhost site to host a database that I access from my android app. I've created a php script like this
<?php
$connection = mysqli_connect("localhost", "my_user", "my_password", "my_db");
...
When I run it, it says it can't connect "Access denied for user 'my_user'@'localhost' (using password: YES)". This is the same syntax the tutorial I watched used. They are using the same site.
But if I give real values to the parameters
<?php
$connection = mysqli_connect("mysql1.000webhost.com", "a80023423_as22", "abc222", "a80023423_as22");
it works.
If someone types my URL in the address bar, they can access all my php files and so goes my passwords and all the data needed to make a connection to the db. I went through some blogs and sites and even some answers in stack but couldn't figure it out how to mask these values.
If there's any tips you can give? Or a link to an already posted answer?