I set everything up in the control panel, but I am just used to filling in the database username and password through dreamweaver. Even when I change the php file in the connections folder that dreamweaver creates, it is not working. GoDaddy does not allow you to use dreamweaver to connect to its databases. The only support they have for databases is this one comment. I dont know what this script does.
This example describes using PHP to connect to a MySQL Database on a Linux hosting account.
<?php
//Sample Database Connection Syntax for PHP and MySQL.
//Connect To Database
$hostname="mysql.secureserver.net";
$username="your_dbusername";
$password="your_dbpassword";
$dbname="your_dbusername";
$usertable="your_tablename";
$yourfield = "your_field";
mysql_connect($hostname,$username, $password);
mysql_select_db($dbname);
Check If Record Exists
$query = "SELECT * FROM $usertable";
$result = mysql_query($query);
if($result)
{
while($row = mysql_fetch_array($result))
{
$name = $row["$yourfield"];
echo "Name: ".$name."
";
}
}
?>