connect_error) { die("Connection failed: " . $conn->connect_error); } // Fetch blog posts from the database $sql = "SELECT * FROM blog_posts ORDER BY created_at DESC"; $result = $conn->query($sql); ?> Blog | Moneyline Parlays

Moneyline Parlays Blog

num_rows > 0) { while($row = $result->fetch_assoc()) { echo '
'; echo '

' . htmlspecialchars($row["title"]) . '

'; echo '
By ' . htmlspecialchars($row["author"]) . ' on ' . date("F j, Y, g:i a", strtotime($row["created_at"])) . '
'; echo '

' . nl2br(htmlspecialchars($row["content"])) . '

'; echo '
'; } } else { echo "

No blog posts yet.

"; } $conn->close(); ?>