
Don't forget to check out part 1 if you have no read it.
In the second part of this 5 part tutorial series on how to build a Twitter-like website, we will be creating a signup form so that users can register to our website.
We will be adding records to the database that we created in part 1 and creating validation rules to make sure that the user didn't put any invalid data into the form.
(more...)

This tutorial will be the first of a five part series where we will built a social network site similar to Twitter from scratch. We will be using the CodeIgniter framework for the core of the website and jQuery for the effects. In this first part we will be configuring CodeIgniter to display everything correctly and we will also set up a database and connect to it.
I have already done this tutorial with CodeIgniter and jQuery it can be found here. I thought I would do this tutorial again but rewrite it for CakePHP because it is a popular PHP framework.
Before we start doing any PHP code make sure to copy in the code below into your MySQL database.
CREATE TABLE `tutorials`.`twitter_messages` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `username` VARCHAR( 30 ) NOT NULL , `message` VARCHAR( 140 ) NOT NULL ) ENGINE = INNODB
Create the controller
Under the folder named controller create a file and call it twitter_controller.php.
We create a class inside it called TwitterController and it will extend AppController. We then set the name of the controller to twitter and tell CakePHP which table we are using in our database.
(more...)
For this tutorial we will be using the ImgBrowz0r class for the backend of the gallery, we will then write a jQuery script so that we can browse through the gallery created by ImgBrowz0r without no page reloads and a nice effect between page requests so the user knows the page has changed. We will also be using the prettyPhoto plugin for jQuery to open up the actual images.
Getting ImgBrowz0r and prettyPhoto to work
The first thing I done was create a folder called jquery_gallery inside here is where all the files and folders are gonna be stored. I then created 4 folders inside jquery_gallery, the folders are called css, images, inc and js.
When you have downloaded the ImgBrowz0r class, copy the file into the inc folder.
(more...)
If you use Twitter you'll notice that there is a more button at the bottom at the bottom of your timeline, when you click this more tweets appear. This is Twitters way of paginating a page. In this tutorial I'll show you how to create a pagination system using CodeIgniter and jQuery that is almost identical to Twitters.
First of all copy this SQL into your database to create a table that we will be using to grab rows from.
CREATE TABLE `tutorials`.`twitter_messages` ( `id` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `username` VARCHAR( 30 ) NOT NULL , `message` VARCHAR( 140 ) NOT NULL ) ENGINE = INNODB
The class that we are going to create within CI will simply add a math question that the user will have to enter correctly to continue. This is useful to stop bots from mass submitting information to your forms.
The class we are going to write is only very short and simple, but it will give you an idea of how to create classes for your own projects.
Creating the new class
First of all we need to create the file for the class, navigate to libraries then create a file called math_question.php.
All we are going to do within this class is generate two random numbers that will be added together.
(more...)
Recently I wrote quite a huge chunk of jQuery for a website and it worked fine. A few days later I checked back to make sure that everything was working correctly after modifying a few things, but to my surprise none of the jQuery code worked. The problem was that I had added some Mootools code, the Mootools code worked fine but the jQuery code did not. I done some searching and found that the two libraries were conflicting and all it takes is 2 extra lines of code to prevent this from happening.
Rackspace Cloud is a great VPS service, but when I recently done a project it needed the functionality of uploading directly from a website to the cloud. I did not find many tutorials on how to do this, so I thought I'd write a tutorial on it myself.
Step 1: Download the required files
The files you will need for this are located at the Rackspace Cloud website here. You can download the API for PHP, Java, Python, .NET and Ruby. But for this tutorial we will be using PHP.
(more...)
This is my screencast for the Nettuts/Screenr screencast competition. I feel as though I rushed it because I had to do it under 5 minutes but I hope you learn a thing or two from it.

