Dreamweaver is popping a syntax error for line 8 (below), but I'm just starting out and can't figure out what is the issue. The Code:
I am following a Youtube tutorial and it looks the same as in the video and it executes in the video (12:23 time frame in video).PHP Code:<?php
include ('includes/connect.php');
function getPosts()) {
$query = mysql_query("SELECT * From posts") or die (mysql_error());
while($post = mysql_fetch_assoc($query)) {
echo "<h2>" . $post['Title'] . "by" . $post['Author'] . "</h2>";
echo $post['Content'];
}
}
?>
Note: Doing this on a localhost and not a live host.



Reply With Quote


Bookmarks