Re: puh-lease help me!
To begin with your program list does not appear complete. The program I have in PHP.and.MySQL.for.Dummies.2nd.Edit.pdf is:
<html>
<head><title>Test MySQL</title></head>
<body>
<!-- mysql_up.php -->
<?php
$host="localhost";
$user="root";
$password="XXXXXXXXXXXX";
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 the 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>
This is what I ran, and it works fine. You must haved missed one of those characters
somewhere. They are sneaky lil critters you have to get them all.
I don't know which HTML editor you are using but you can certainly use Notepad to replace them.
Subject
Written By
Posted
Re: puh-lease help me!
July 20, 2005 07:52AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.