Get data from php mysql

Im creating a login page, and It need to talk to php, and get data from mysql, like username, status.
when I test it in browser, it give me nothing, im using alert to know what information i get .

even worse, when I use ionic view on my phone, the alter function did not work