Archive for the ‘cakephp’ category

CakePHP Relationships Explained

February 20th, 2011 Leave a comment 3 comments
CakePHP Relationships Explained

If you’ve developed with SQL databases in the past, you’ve probably had experience with the various SQL relationship types: one-to-one, one-to-many and many-to-many. In CakePHP, each database table is typically associated with a model. The relationships between the items in these tables are referred to as associations in CakePHP. CakePHP has an association for each type of relationship. We’re going to look at the four CakePHP associations, how they relate to the traditional SQL relationship and how to work with them in a CakePHP application. To describe these associations, we’ll be using a real… View full post »

reCAPTCHA with CakePHP Forms Tutorial

January 14th, 2011 Leave a comment
reCAPTCHA with CakePHP Forms Tutorial

Unfortunately, as a developer today, you have to consider the possibility of spammers using automated scripts to submit the forms on your web site. One popular method for preventing this is to use a CAPTCHA. A CAPTCHA is an image that contains words or an alphanumeric code. The image is often slightly distorted. The user must correctly enter the words or code for the form to be considered valid. This prevents scripts from submitting forms since the CAPTCHA is not readable by automated systems. The most popular system for implementing CAPTCHA is reCAPTCHA by Google. … View full post »

CakePHP Installation & Configuration

December 15th, 2010 Leave a comment 1 comment
CakePHP Installation & Configuration

In the past, we have discussed the importance of application frameworks. Frameworks make it easier to write maintainable code and they also provide a shortcut for rapidly developing new web applications. One of the more popular frameworks for use with PHP is CakePHP. CakePHP is a model-view-controller style framework. Structurally, it has many similarities to Ruby based Ruby on Rails web framework. CakePHP is one of the oldest and most robust and stable PHP frameworks on the market. CakePHP is free and open source. They have a manual called the Cookbook that provides… View full post »

Check for Available Username with CakePHP, Ajax and jQuery

September 27th, 2010 Leave a comment 9 comments
Check for Available Username with CakePHP, Ajax and jQuery

When a user registers for your web site, it is usually a requirement that they have to select a unique username. It can be a pain when your usual usernames are taken. You keep submitting the form just to wait and then see an error message that the username is already taken. Using Ajax to check and see if a username is available before the user submits the form will make your registration page more friendly. Here is one method for doing it using CakePHP, Ajax and jQuery. First, we are going to create a very lighweight… View full post »