As another extra feature of the site I wanted the user to be able to delete their post so they could either redo it or be able to update it. I had to add a new delete_post.php file and create an if statement so if the user was logged in then the delete button would appear and they were able to delete only their posts. I also created a message if they were not able to delete their post then it would appear with an error message.
I then needed to add the function to the box1.php as that is where I wanted the button to appear.
<!--?php if ($_SESSION["user_id"]==$row["user_id"]) {?--></pre> <div id="delete_post" class="delete"><a id="" href="delete_post.php?id=<?php echo $row[">"><button class="btn btn-danger" type="button">Delete Post</button></a></div> <pre><!--?php } ?--> <!--?php } else { ?--> <!--?php } ?-->
I then wanted to style this button so the text would stand out in the box and it actually looked like a delete button. I went onto Bootstrap and found the best delete button (the danger button) I could find and added it to the box1.php code.

Source – http://getbootstrap.com/css/#buttons
This is what the final product looks like: