Home arrow PHP arrow Displaying User Comments in a Code Igniter Blog Application

Displaying User Comments in a Code Igniter Blog Application

Welcome to the third part of the six-part series titled “Building a Blogger with the Code Igniter PHP Framework.” In successive tutorials, this series shows you how to use this software package to develop a blog application by using the Model-View-Controller design pattern. In this article, you will learn how to make the application display user comments.

TABLE OF CONTENTS:
  1. Displaying User Comments in a Code Igniter Blog Application
  2. Review: displaying paginated blog entries
  3. Displaying user-supplied comments
  4. Creating a view file to display user-submitted comments
By: Alejandro Gervasio
Rating: starstarstarstarstar / 7
December 23, 2008

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

From a programmer’s point of view, building a blog application with PHP can be an extremely educational experience. This process generally requires working with MySQL, as well as creating scripts that must handle several result sets, update and delete database records, and so forth.

Developing such a web application is something that most programmers would love to do, as long as they don’t have to spend a lot of time writing new code. Fortunately, there are several PHP frameworks available on the web that allow users to develop PHP programs with minor hassles. Code Igniter (http://codeigniter.com) is one of the friendliest to use and learn.

So, if you’re interested in learning how to take advantage of the functionality provided by Code Igniter to build a blogger, then this series of articles might be what you’re looking for.

If you had the chance to read the previous article, then you're becoming familiar with building a blogger using Code Igniter. In that tutorial I explained how to combine the functionality of a couple of files to display blog entries previously stored in a MySQL table.

In this specific case, the first of these files was defined as a basic controller, and was provided with the ability to paginate the aforementioned blog entries via the corresponding pagination class included with Code Igniter.

However, in its current incarnation, the blog application is pretty limited. It doesn’t let users post comments on each blog entry. Thus, in the next few lines I’ll be improving the signature of the controller class to address this important issue.

Are you ready to continue learning how to build a blogger with Code Igniter? Then let’s get going!



 
 
>>> More PHP Articles          >>> More By Alejandro Gervasio
 

blog comments powered by Disqus
   

PHP ARTICLES

- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap

Dev Shed Tutorial Topics: