LumbeeNDN
January 18th, 2010, 01:02 AM
I had this code running on a Windows box, and I moved the DB over to Ubuntu, and its not working any more. Its failing on the
$result = mysqli_query($dbc, $query)
or die ('Error connecting to DB');
..which is odd, because the mysqli_connect line is OK...any ideas?
<!-- Author:
Date:
File: vieworgs.php
Purpose:
-->
<html>
<head>
<title>Speech In Progress</title>
<link rel ="stylesheet" type="text/css" href="style.css" >
</head>
<body>
<h1>View Organizations</h1>
<table>
<p>
<?php
$dbc = mysqli_connect('localhost', 'root', '', 'speechnprogress')
or die ('Error connecting to DB');
$query = "SELECT * FROM ORGANIZATIONS";
$result = mysqli_query($dbc, $query)
or die ('Error connecting to DB');
while($row = mysqli_fetch_array($result))
{
echo $row['orgName'] . " " . $row['orgContact'];
echo "<br />";
}
mysqli_close($dbc);
?>
<td><a href="/snp/admin.html">Back to Admin Page</a></p>
</p>
</tr>
</form>
</table>
</body>
</html>
$result = mysqli_query($dbc, $query)
or die ('Error connecting to DB');
..which is odd, because the mysqli_connect line is OK...any ideas?
<!-- Author:
Date:
File: vieworgs.php
Purpose:
-->
<html>
<head>
<title>Speech In Progress</title>
<link rel ="stylesheet" type="text/css" href="style.css" >
</head>
<body>
<h1>View Organizations</h1>
<table>
<p>
<?php
$dbc = mysqli_connect('localhost', 'root', '', 'speechnprogress')
or die ('Error connecting to DB');
$query = "SELECT * FROM ORGANIZATIONS";
$result = mysqli_query($dbc, $query)
or die ('Error connecting to DB');
while($row = mysqli_fetch_array($result))
{
echo $row['orgName'] . " " . $row['orgContact'];
echo "<br />";
}
mysqli_close($dbc);
?>
<td><a href="/snp/admin.html">Back to Admin Page</a></p>
</p>
</tr>
</form>
</table>
</body>
</html>