Cant connect mysql database through php script remotely
I purchased a Linux Web Hosting because I need an online MySQL database. i have linux hosting.I need to access that database using .php scripts when i tried my code in localhost i got the result but if i put my website ip address to connect a data base i have created through cpanel with php admin . The php script will not give error but also will give no result. just blank. i will confess that i am novince in this area ...connecting a remote data base. please can someone be patient to tell me steps i should take to get my database running. This is my code
<?php //Sample Database Connection Syntax for PHP and MySQL.