CodeIgniter

Working With CodeIgniter’s Controller

Getting Started with CodeIgniter
Let’s face it, the app we’ve been building isn’t much good without the ability to dynamically add tasks instead of having to pull up a database editor so we can insert them ourselves. Today, we’ll discuss how to create this. But before we do, we have to add a categories drop-down list that pulls its data from the database. That’s extremely easy to do in CodeIgniter. First, let’s add some tasks. Open up your database editor of PHPMyAdmin (or whatever… continue…

Add CSS, Database Tables to Your CodeIgniter App

Getting Started with CodeIgniter
In my last installment, we set up a framework so we could begin building the app we’ll dig into today. Before we go any further, however, we need to do two more things. See All of Scott’s CodeIgniter Stories. First, our app has no styling. Here’s some basic CSS so we have something that’s at least a little more attractive: This isn’t a CSS tutorial, so I won’t go over the code in depth. It’s fairly straightforward, anyway. All I’ve… continue…

How to Build a To-Do App with CodeIgniter

Getting Started with CodeIgniter
Now that I’ve introduced you to the framework, it’s time to get started on our project.  We’re going to be creating a to-do app, step-by step, over the course of the next few tutorials. Today, we’re going to do the initial configuration and I’m going to introduce you to a helper, specifically the form helper. This is something you’ll always want to include in your autoload file because it is going to be called all the time. What good is… continue…

How to Build a To-Do App with CodeIgniter

Getting Started with CodeIgniter
Now that I’ve introduced you to the framework, it’s time to get started on our project.  We’re going to be creating a to-do app, step-by step, over the course of the next few tutorials. Today, we’re going to do the initial configuration and I’m going to introduce you to a helper, specifically the form helper. This is something you’ll always want to include in your autoload file because it is going to be called all the time. What good is… continue…

Modeling Data With CodeIgniter

Getting Started with CodeIgniter
This is going to be the last chapter in my series on CodeIgniter before we begin our project. It’s important to understand how to model data for consumption by views. I’m not going to go into the basics of MySQL here. There are plenty of courses out there to learn about that. For a lot of what you do in CodeIgniter, you’re not going to be writing SQL, anyway. We’ll be using CI’s ActiveRecord. Please note this is not Ruby’s… continue…

How to Build Controllers and Views with CodeIgniter

Getting Started with CodeIgniter
Now that we have the CodeIgniter configuration out of the way, let’s get started with our first controller. We’ll also create a view for it, and then we’ll pass data from the controller to the view. Creating a controller is fairly easy once you’ve done it a couple of times, but at first it can be a bit confusing to someone with little experience in PHP.  There are three major rules for controllers: They must have names that are legal… continue…

CodeIgniter: How to Configure the Framework

Getting Started with CodeIgniter
In this, the second part of my series on working with CodeIgniter, we’ll move into configuring the framework for use on a local computer or dedicated server. Since the staff at Ellis Labs has made this easy, you’ll be up and running in minutes. If you’ve unzipped the CI zip file, as I described in my first post on CodeIgniter, you should be looking at something like this: As I said in Part 1, the first thing I do when… continue…

Getting Started With CodeIgniter

Getting Started with CodeIgniter
CodeIgniter is a popular PHP MVC framework that’s developed a following for a variety of reasons: First, it’s very well documented. Second, there’s a lot of support for it in forums — people are familiar with it and generally happy to help. Third, there are many, many tutorials out there on how to use it. Fourth, it’s free. And fifth, it’s MVC. This is the first in a series where we’ll delve in CodeIgniter. We’ll start with an introduction to… continue…