arms - 11:36 am on Oct 10, 2011 (gmt 0)
I repeat my post go to your hosting providor and ask them for the location/address of your db server (it could be anything ie: db1.000webhost.com or lljknsdf.000webhost.com or even just an IP address). Until you have that info you aren't going anywhere. Then I assume you have logged onto db server and created your database with the appropriate tables etc, 000webhost should give you an admin login to your db server to allow you to do this, create a public user with password and grant permissions, put these credentials including host into your mysql_connect and robert is your fathers brother.
i far as I can tell you-re just uploading the php code and trying to connect to the local server of your pc. It doesn't work that way localhost refers to your machine and doesn't resolve in the www. the 000webhost has no idea where to look for your db server. *(although I have to say your error says you're using localhost as a username?)