Home arrow PHP arrow Building a Database-Driven Application with the Code Igniter PHP Framework

Building a Database-Driven Application with the Code Igniter PHP Framework

If you’re a PHP developer who’s searching for a framework that lets you build full-blown web applications very quickly and with an easy learning curve, look no further. Welcome to the second part of the series entitled “Introducing the Code Igniter PHP framework.” This series of articles shows you how to use this friendly yet powerful PHP framework to easily develop database-driven applications by using the Model-View-Controller design pattern.

TABLE OF CONTENTS:
  1. Building a Database-Driven Application with the Code Igniter PHP Framework
  2. Retrieving user-related data from a MySQL table
  3. Defining a controller class
  4. Outputting user-related data with Code Igniter
By: Alejandro Gervasio
Rating: starstarstarstarstar / 17
August 20, 2008

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Introduction

Now that you have been introduced to the main subject of this series, it’s time to recall the concepts deployed in the preceding tutorial, in case you haven’t had the chance to read it yet. During that article, I discussed a few basic topics you will need to understand to start using Code Igniter, ranging from how to correctly set up its configuration files and understanding its URL routing mechanism, to developing a sample web application, which made use of the Model-View-Controller approach.

Put in a simple way, the application was tasked with displaying a trivial message on screen, a process that was performed by way of two source files. The first one was defined as the application’s controller, and the second one was simply a template file, also known as a “view” within the context of the MVC pattern.

Essentially, the relationship established between these two sample files can be outlined as follows: the controller precisely controls the flow of the application and passes a bunch of data to be embedded into an HTML file to the view, which is finally displayed on screen. That’s all.

However, this initial sample application was pretty primitive, actually. Therefore, in this second part of the series, I’m going to teach you how to use some core classes bundled with Code Igniter, this time for building a MySQL-driven program, which will first fetch some data from a MySQL database table, and then print this information on the browser.

As you’ll see in the next few lines, developing this PHP application will require us to define a model class, apart from building the respective controller and view files. Thus, don’t waste more time in preliminaries and begin reading now!



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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

PHP ARTICLES

- 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: