Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<?php include("includes/header.php");
if(isset($_GET['post'])) {
$id = mysqli_real_escape_string($db , $_GET['post']);
$query = "SELECT * FROM posts WHERE id='$id'";
}
$posts = $db->query($query);
?>
<br>
<?php if($posts->num_rows > 0) {
while($row = $posts->fetch_assoc()) {
?>
<div class="blog-post">
<h2 class="blog-post-title"><?php echo $row['title']; ?></h2>
<p class="blog-post-meta"><?php echo $row['date']; ?> by <a href="#"><?php echo $row['author']; ?></a></p>
<?php echo $row['body'];
?>
<br>
</div><!-- /.blog-post -->
<?php } } ?>
<blockquote>2 comments</blockquote>
<div class="comment-area">
<form>
<div class="form-group">
<label for="exampleInputEmail1">Name</label>
<input type="test" name="name" class="form-control" id="exampleInputEmail1" placeholder="Name">
</div>
<div class="form-group">
<label for="exampleInputEmail1">Website</label>
<input type="test" name="website" class="form-control" id="exampleInputEmail1" placeholder="Website">
</div>
<div class="form-group">
<label for="exampleInputPassword1">Comment</label>
<textarea cols="60" rows="10" name="comment" class="form-control"></textarea>
</div>
<button type="submit" name="post_comment" class="btn btn-primary">Post Comment</button>
</form>
<br>
<br>
<br>
<div class="comment">
<div class="comment_head">
<a href="#">Case Polen</a>
<img width="50" height="50" src="img/noimg.jpg"/>
</div>
This is a comment.
</div>
</div>
<div class="comment">
<div class="comment_head">
<a href="#">Case Polen</a>
<img width="50" height="50" src="img/noimg.jpg"/>
</div>
This is a comment.
</div>
</div>
</div><!-- /.blog-main -->
<?php include("includes/footer.php");?>