I have a
API Rest that I use locally and I need to upload it to a web server. The problem I have is that it will not be configured once it is uploaded to communicate with the server's SQL database.
The error I get is this:
XMLHttpRequest cannot load http://error.hostinger.eu/?. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://hanoi.hol.es' is therefore not allowed access.
It's the first time I have to upload things to a server, excuse my ignorance:)
PS: I just realized that the api has incorporated the CORS.
PD-2: just to discard, the address to connect to the database should be this
$_server = "mysql.hostinger.es"; ?