noob. php. unable connect. no such directori

I am trying connect to mysql with php, I follow the guide in knowledge and I put (I think) the correct host… you can see it at []

i tried mysqli and PDO…

anybody could help me?

Did you see this article already? Common MySQL Connection Errors - Docs - InfinityFree Forum

yes I did.

@dawspb said:
yes I did.

I checked your code. I see you define the configuration values in the global scope but set up the connection in a function. However, you cannot access variables in the global scope from a function. You should pass the configuration values to the function if you want to use them in the function.

you are rigth, apologies for my incompetence