PHP
  Home arrow PHP arrow Building a Database-Driven Application...
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Sun Developer Network 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Mobile Linux 
App Generation ROI 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Building a Database-Driven Application with the Code Igniter PHP Framework
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2008-08-20

    Table of Contents:
  • Building a Database-Driven Application with the Code Igniter PHP Framework
  • Retrieving user-related data from a MySQL table
  • Defining a controller class
  • Outputting user-related data with Code Igniter

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


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


    (Page 1 of 4 )

    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.

    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


       · In this second part of the series, you’ll get started using some core classes...
       · Hello, Alejandro i just ask you What do you think of this outdated php4 style, which...
       · I get a class redefined error with the code presented in the article. The problem is...
       · There doesn't appear to be any indentation in the sample code, making it very hard...
       · Thanks for the kind comments on my PHP article. As I explained in the first article,...
       · Thanks for the kind comments on my PHP article. Sorry to hear about code indentation...
       · Thanks for the kind words on my PHP article. Yes, your code is a correct...
     

       

    PHP ARTICLES

    - Authentication Scripts for a User Management...
    - Utilizing the Use Keyword for Namespaces in ...
    - Building a User Management Application
    - Working With Different Namespaces in PHP 5
    - User Management Explained: Overview
    - Using Namespaces in PHP 5
    - Database Security: Guarding Against SQL Inje...
    - Building a Modular Exception Class in PHP 5
    - Database and Password Security for Web Appli...
    - Handling MySQL Data Set Failures in PHP 5
    - Building Site Registration for Web Applicati...
    - Intercepting Customized Exceptions in PHP 5
    - Securing Your Web Application Against Attacks
    - Sub Classing Exceptions in PHP 5
    - Authentication for Web Application Security





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT