Hi all, I’m a little frazzled by this problem so hopefully somebody can point me in the right direction.
I’m using Dreamweaver 8 with MySQL 5, and phpMyAdmin.
I’ve been making changes to my website template which is connected to my database and somewhere along the way I’ve encountered a problem with the php script that connects to the DB.
Now in Dreamweaver I’ve tested the connection to the DB and it successfully connected however when I test it on my browser I get the following fatal error:
Fatal error: Access denied for user ‘root’@’localhost’ (using password: NO) in c:inetpubwwwrootwebsiteConnectionsconnect.php on line 9
Now I can think it can be one of two things.
1) the connect.php is incorrect (although I can connect to the DB from connect.php from within dreamweaver).
2) The generated php script is wrong:
[code]<?php require_once(‘../Connections/connect.php’); ?>
<?php
$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET[‘pageNum_Recordset1’])) {
$pageNum_Recordset1 = $_GET[‘pageNum_Recordset1’];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
mysql_select_db($database_connect, $connect);
$query_Recordset1 = “SELECT * FROM tblnews ORDER BY newsID DESC”;
$query_limit_Recordset1 = sprintf(“%s LIMIT %d, %d”, $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query($query_limit_Recordset1, $connect) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
if (isset($_GET[‘totalRows_Recordset1’])) {
$totalRows_Recordset1 = $_GET[‘totalRows_Recordset1’];
} else {
$all_Recordset1 = mysql_query($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
?>
Anyone have any clues?