I'm trying to get mysql connections to work in dreamweaver (i've managed to get it to work manually, but I can't get any response from dreamweaver).
Dreamweaver creates this connection file (I haven't tested to see if it works)
<?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_thegeneral = "mysql57.secureserver.net";
$database_thegeneral = "thegeneral";
$username_thegeneral = "thegeneral";
$password_thegeneral = "********";
$thegeneral = mysql_pconnect($hostname_thegeneral, $username_thegeneral, $password_thegeneral) or trigger_error(mysql_error(),E_USER_ERROR);
?>
The code I used to test the connection with (I tested this and even tried replacing dreamweavers code with it)
<?php
$hostname="mysql.secureserver.net";
$username="thegeneral";
$password="********";
$dbname="thegeneral";
$usertable="authentication";
$yourfield = "user_name";
mysql_connect($hostname,$username, $password) OR DIE (" ");
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."
";
}
}
?>
The code I used to replace dreamweavers connection file with
$hostname="mysql.secureserver.net";
$username="thegeneral";
$password="********";
$dbname="thegeneral";
$usertable="authentication";
$yourfield = "user_name";
mysql_connect($hostname,$username, $password) OR DIE (" ");
mysql_select_db($dbname);
The error message dreamweaver gives when i try to test the connection in dreamweaver
I don't understand y it isn't working
Whats the reason for the 404 error and whats this MMHTTPDB.php file it mentions in the error message? I've tried everything i can think of to fix this problem but I just can't make a connection in dreamweaver. Thank you for your help.