This article is 13 years old
The content here might be outdated as technology and best practices evolve quickly. While the concepts may still be valuable, please verify the information against current documentation and standards.
CakePHP Basics Tutorial - Part 2
Overview
In this tutorial I’ll show you in about 30 minutes how to create a html form with the built-in FormHelper of CakePHP which automatically links up to the database fields to see what kind of input field should be generated. Further on we also check out the built-in validation options and how we can save our submitted form data to the database. And at the end I’ll explain how you can use CakePHP’s Model callback functions to put in our custom code before a CakePHP action.
In this tutorial I'll be covering- Create a Form via FormHelper
- Save data to the database
- Do validation on different fields with custom error messages
- Explain callbacks and use it to hash our password
- Do redirect after a save
This part is the follow-up on what we have seen in part 1 of my CakePHP basics serie!
Let me know if you enjoyed it!
About the Author
👋 Hi, I'm Frederik Jacques, a passionate iOS developer and entrepreneur with over a decade of experience building innovative mobile applications.
I love creating apps that solve real problems and bring joy to users. From educational tools to creative meme makers, I'm always exploring new ways to blend technology with user experience. When I'm not coding, you'll find me sharing insights about iOS development, app monetization, and the indie developer journey.