If it works on one server and not on another, then it probably isn't an issue with the code, so I won't be able to spot anything.
It could be that your connection information is different on your server and isn't correct for the other. I'd start by adding this to the top of the page:
<?php
ini_set("display_errors",1);
?>
That might give you an error to go on at least and help you figure out what needs to be changed.