I am getting this error when I am attempting to test access to database I created is mysql...
Parse error: parse error in /home/emeraldv/public_html/theroswellproject/mysql_up.php on line 8
the host may be wrong but the domain is as listed
the database is named "roswell"
the username is "roswell"
the password is altered to protect the clueless.
the test page looks like this...
html>
<head><title>Test MySQL</title></head>
<body>
<!--mysql_up.php -->
<?php
$host="emeraldvisions.net"
$user="emeraldv_roswell"
$password="the password"
mysql_connect($host,$user,$password);
$sql="show status";
$result = mysql_query($sql);
if ($result == 0)
echo "<b>Error " . mysql_errno() . ": "
. mysql_error() . "</b>";
else
{
?>
<!-- Table that displays results -->
<table border="1">
<tr><td><b>Variable_name</b></td><td><b>Value</b>
</td></tr>
<?php
for ($i = 0; $i < mysql_num_rows($result); $i++) {
echo "<TR>";
$row_array = mysql_fetch_row($result);
for ($j = 0; $j <mysql_num_fields($result); $j++)
{
echo "<TD>" . $row_array[$j] . "</td>";
}
echo "</tr>";
?>
</table>
<?php } ?>
</body></html
Any ideas what could be wrong?


LinkBack URL
About LinkBacks



Reply With Quote
Bookmarks