Yes, I am able to view the database remotely, without a password, using the code below. The problem comes when I, or a user, tries to acccess data with a username and password. I never had a problem until four days ago.
<html>
<head>
<title>get data2p</title>
</head>
<body>
<?php
#connect to MySQL
$dbh=mysql_connect ("localhost", "lhsnycne", "psd")
or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("lhsnycne_mydata");
#select the specified database
$rs = @mysql_select_db("lhsnycne_mydata", $dbh)
or die("Err😃b");
#create the query specifying the required id
#$sql="select id,fname,lname,avg2 from grades9"
$sql="select studentid,fname,lname,avg2 from grades9" ;
#execute the query
$rs=mysql_query($sql,$dbh);
#start table
$list = "<table border=\"1\" cellpadding=\"2\">";
$list.="<tr><th>ID</th>";
$list.="<th>First Name</th>";
$list.="<th>Last Name</th>";
$list.="<th>Password</th></tr>";
#loop through each row
while( $row = mysql_fetch_array($rs) )
{
$list .= "<tr>";
$list .= "<td>".$row["studentid"]."</td>";
$list .= "<td>".$row["fname"]."</td>";
$list .= "<td>".$row["lname"]."</td>";
$list .= "<td>".$row["avg2"]."</td>";
$list .= "</tr>";
}
$list .= "</table>";
#write out the list
echo($list);
?>
</body>
</html>