Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
I tested the above code locally and on a Droplet and the code works without any issues, though the issue on your end may be with $host. In most cases, you’d need to specify localhost as the host unless the provider specifically requires you to use an IP address.
If you installed Apache, PHP, and MySQL on a Droplet, unless you configured MySQL to bind to an IP specifically, you would need to use localhost as the host.
Thank you for the reply. I tried installing PHP on the Droplet and changing the host to localhost but still no luck (just a blank page).
Maybe I didn’t explain myself properly but is what I am trying to do possible? Ie create a database through MySQL on the Droplet and then upload a PHP file (above) to my web host (godaddy) to pull back information from the MySQL database (which is on the Droplet) and display this information on the web page?
Alex.
This comment has been deleted