That depends...
first of all, you need to check if you have remote
access to that database at all (I guess it's
mysql, right?). Most providers deny direct
access to a hosted database from other computers than the webserver, that is for security reasons.
Have a google for
MySQL Front. It's commercial software, but you can get a free trial version with which you can test remote
access to that database. Try to connect to that database with
mysql front, if you can connect, and if you can do the desired operations through
mysql front, then the next step is to build that in your application. If you don't have remote
access at all (perhaps contacting your provider could also help), your stuck with this possibility and need to use php to gain database
access.
If you get a connection, have a look at the ZEOS components for direct database
access.