PHP Programming Language

AJAX Form Submit with CakePHP 2.x

CakePHP has some great tools for a PHP developer to crank out JavaScript functions using only PHP. The JsHelper supports Prototype/Scriptaculous, Mootools/Mootools-more, and jQuery/jQuery UI. Refer to the CakePHP Book for details on all the functions provided by the JsHelper. In this example we're going to look at a creating a contact form that submits via AJAX, but also works properly for users without JavaScript.

Writing Secure Code with CakePHP 2.x Forms

CakePHP is one of my favorite web frameworks. There is one glaring security hole that caught my attention though. Without proper care from the developer, users have the potential to tamper with data sent with forms. For example, a common operation is to take the value from a form and save it like this:


Let's say the user manipulates the form and adds this line:

CakePHP vs Drupal

There are many PHP frameworks out there, but 2 of my personal favorites are Drupal and CakePHP. WordPress is another popular in the world, and I have done many projects with it. I will say that WordPress has great documentation and a clean API, but it is rather limited in its capabilties. CakePHP and Drupal have proven to be flexible, scalable, and perfect for certain uses. The bottom line in this debate is that both are great, and both serve their purposes. Between CakePHP and Drupal, I feel a project of any size can be accomplished.