I've got my website and database hosted by GoDaddy. I just got off the phone with Customer Support and they're unable to give me an answer (I don't believe he understands my problem).
I have my website running through MAMP locally. I want to be able to connect to my hosted database at GoDaddy while I test it locally. Unfortunately, the mysql_connect fails when running locally but if I ftp the files to the GoDaddy hosting, it connects fine.
index.php
dbconnect.php
Anyone have experience with GoDaddy hosted databases?
Thanks for your help.
I have my website running through MAMP locally. I want to be able to connect to my hosted database at GoDaddy while I test it locally. Unfortunately, the mysql_connect fails when running locally but if I ftp the files to the GoDaddy hosting, it connects fine.
index.php
PHP:
<?php
...
require("dbconnect.php");
...
?>
PHP:
<?php
//Connect To Database
$hostnmae='<hidden>';
$username='<hidden>';
$password='<hidden>';
$dbname='<hidden>';
mysql_connect($hostname,$username,$password) OR DIE ('Unable to connect to database! Please try again later.');
mysql_select_db($dbname);
?>
Anyone have experience with GoDaddy hosted databases?
Thanks for your help.