I get this error:
I double checked the DB and table names.
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home2/stliuq/public_html/guestbook.php on line 48
PHP:
<?php
$con = mysql_connect("localhost","personremoved","passremoved");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("dbremoved", $con);
/*THIS IS LINE 48*/ $result = mysql_query("SELECT * FROM posts");
while($row = mysql_fetch_array($result))
{
echo '<div class="name">';
echo $row['name'];
echo '</div>';
}
mysql_close($con);
?>
I double checked the DB and table names.