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.

  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



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
escort Bursa Bursa escort Antalya eskort


- Hackers Compromise PHP Sites to Launch Attac...
- Red Hat, Zend Form OpenShift PaaS Alliance
- PHP IDE News
- BCD, Zend Extend PHP Partnership
- PHP FAQ Highlight
- PHP Creator Didn't Set Out to Create a Langu...
- PHP Trends Revealed in Zend Study
- PHP: Best Methods for Running Scheduled Jobs
- PHP Array Functions: array_change_key_case
- PHP array_combine Function
- PHP array_chunk Function
- 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...

Developer Shed Affiliates


Dev Shed Tutorial Topics: