puh-lease help me!
WHAT am I doing wrong that I can't make this test work? I know it's the host, user and password... but I don't know what I need to put in there. Well, I know what to input for the password.
But -- $host??? localhost??? $user???? root???? I've tried everything I can think of and I don't know why it won't work. Like I said on a previous post. I have PHP & SQL for dummies and apparently am too dumb to even figure it out. WHAT am i missing?!?!?!?!
Please help!!
<html>
<head><title>Test MySQL</title></head>
<body>
<!-- mysql_up.php -->
<?php
$host=”hostname”;
$user=”mysqlaccount”;
$password=”mysqlpassword”;
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>
Subject
Written By
Posted
puh-lease help me!
July 19, 2005 01:18PM
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.