I have my PHP file:
<?php
mysql_connect('hostejemplo.com','usuario','contraseña') or die('no se puede conectar');
mysql_select_db('basededatos');
$sql="SELECT * FROM tabla";
$resultado=mysql_query($sql);
while($row = mysql_fetch_assoc($resultado)){
$arr[] = $row;
}
$json = json_encode($arr);
echo $json;
?>
How can I make it so that not everyone can see those results? Maybe with a simple login username but how would it be?