I have a form which submits comments onto a page. When the comment is submitted I'm using jQuery to submit the variables and then return me a success message. I have also coded a way of reloading my <div> tag which contains a PHP include file, but I receive a mysql error (shown below) - all variables have been defined:
PHP include code:
<?php
$fresult = mysql_query("SELECT * FROM cmmnts WHERE tusr='$tuid'")
or die(mysql_error());
echo "<div id='cmnts'><table width='65%' border='0' cellpadding='4' cellspacing='4' id='table' style='padding-left:20px'>";
while($rhw = mysql_fetch_array($fresult)) {
$cmnt = $rhw['themsg'];
$dte = $rhw['thedate'];
$msgid = $rhw['id'];
$fcom = "(".$cmnt.")<br><hr><br>";
echo "<tr><td id='$msgid'> $fcom </td></tr>";
}
echo "</table></div>";
jQuery code:
success: function(r) {
$('.ajaxresult').html(r);
$('#divcmnts').fadeOut("slow").load('comments.php').fadeIn("slow");
Error:
Warning: mysql_query() [function.mysql-query]: Access denied for user 'usj'@'localhost' (using password: NO) in *MY FILE PATH* on line 6
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in *MY FILE PATH* on line 6
Access denied for user 'usj'@'localhost' (using password: NO)
Any ideas?