I am getting the error: Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' on line 28.
Here is my code:
<?php
/* Program: mysql_up.php
* Desc: Connects to MySQL Server and
* outputs settings.
*/
echo "<html>
<head><title>Test MySQL</title></head>
<body>";
$host="localhost";
$user="root";
$password="";
$cxn = mysqli_connect($host,$user,$password);
$sql="SHOW STATUS";
$result = mysqli_query($cxn,$sql);
if($result == false)
{
echo "<h4>Error: ".mysqli_error($cxn)."</h4>";
}
else
{
/* Table that displays the results */
echo "<table border='1'>
<tr><th>Variable_name</th>
<th>Value</th></tr>";
for($i = 0; $i < mysqli_num_rows($result); $i++)
{
echo '<tr'
$row_array = mysqli_fetch_row ($result);
for($j = 0;$j < mysqli_num_fields($result);$j++)
{
echo '<td'.$row_array[$j].'<td\n';
}
}
echo '</table>';
}
php?>
</body></html>
I have had many other errors in this code which I beleive I have fixed, but I'm stuck on this one. Any help would be great, thanks.