so, im editing my site and i made a blog, it worked earlier but idk why its not working now. it may be something small that im just over looking but my table of entries come up empty when i know my mysql server has 1 entry in that table. im using easyphp for development. here is the code.
<?php
$con=mysqli_connect("localhost","root","","admin");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
include "menu.php";
?>
<center>
<table border="1" width = "1250px" style="height:500px;color:white;" bordercolor="red">
<tr>
<td style="color:white;text-align:left;vertical-align:top;background-color:black;background: rgba(0, 0, 0, 0.3);">
<table>
<tr>
<td style='color:white;'><b>BLOG ENTRIES</b></td>
</tr>
<?php
$result = mysqli_query($con,"SELECT * FROM blog_list");
if($result == FALSE)
{
die(mysql_error());
}
if(!$row = mysqli_fetch_array($result))
{
echo "<tr><td style='color:white;'>The blog is currently empty.</td></tr>";
}
else
{
while($row = mysqli_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['title'] . "</td>";
echo "<td>" . $row['body'] . "<br><font size=-2>Submited by " . $row['submitor'] . ": Dated " . $row['submition'] . "</font></td>";
echo "</tr>";
}
}
?>
</table>
</td>
<td width = "280px" style="background-color:black;background: rgba(0, 0, 0, 0.3);">
<?php
include "sidebar.php";
?>
</td>
</tr>
</table>