Creating forms that don't resubmit in Kohana

less than a year ago | 2 Comments

It is definitely one of my pet peeves: reloading a page only to see the "Confirm Form Resubmission" alert box that wants me to find my mouse and click on something that could have easily been prevented by the developer. This is 2011, for crying out loud, can't we have forms that don't suck?

The easiest solution to this problem is to load all posted form data into the session, and then reload the page internally. This clears the POST request while maintaining the submission and makes for happier users (and less headaches about the same comment submitted 14 times in a row).

[read more]

Auth module for Kohana 3.1 using ORM Driver

less than a year ago | 27 Comments

One of the changes to the 3.1 release of Kohana has been the removal of the ORM driver as part of the official Auth module. To avoid the confusion that the Auth module required the ORM module, Auth now ships with only a file driver.

This has left some people under the impression that in order to use the ORM, porting a driver is necessary. This is not the case, in fact, the ORM Auth driver is now living in the ORM module with all the database schema examples in MySQL and PostgreSQL.

To get started, you are first going to need to have Kohana 3.1 installed with the Auth, Database, and ORM modules enabled and configured. In your APP_PATH/config directory your auth.php configuration file needs to have the driver set to use the ORM, and a hash_key must be specified.

[read more]
JDStraughan

Jason Straughan

I live in the beautiful Texas hill country where I concentrate on building great web applications, writing, and enjoying time with my family. Recently I completed my first book, "Beginning Kohana 3 Development" for Packt Publishing.