I can connect to my localhost and get info from a local phpMyAdmin database.
Now I want from a php file, that is stored on my local computer, but now the php file refers me to go to an external website:
<?php
//mysql_connect('localhost','root','root');
mysql_connect("http://eternal website","username","password");
mysql_select_db("dlvplant_portret_v1");
$q=mysql_query("SELECT * FROM people WHERE voornaam LIKE '%%'");
//$q=mysql_query("SELECT * FROM people WHERE voornaam ='""'");
while($e=mysql_fetch_assoc($q))
$output[]=$e;
print(json_encode($output));
mysql_close();
?>
I tried the link and copy/paste the username and pass and I use the good website link. (the link brings me at the myPhpAdmin login from the server). So everything works and is filled in good. But when I try to connect with my android phone (from phone to local comp's php file) then the php file refers me to go to external webpage, but it says: Host is unknown
Is it even possible to go from local to external and back again?