Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

PHPFreaks.com:
Working with checkboxes and a database
Jan 13, 2009 @ 03:13:12

On the PHPFreaks.com website a new tutorial (by Ben Smithers) looks at interfacing checkboxes in your application's form with a backend database.

The concept is actually pretty simple. It involves naming your checkbox as an array and the use of the IN mysql clause. This tutorial aims to give a simple example in the hope that, next time someone asks, I can point them to a tutorial rather than explaining all over again.

They include the database structure, insert statements and the code needed to pull and push the information for the checkboxes.

tagged: checkbox database tutorial admin setting

Link:

ProDevTips.com:
Extending PHP Doctrine Record - Check Box Groups
Aug 12, 2008 @ 18:26:36

In the third part of the series dealing with using Doctrine in your PHP applications, ProDevTips has this third part looking at a method for extending the tool's current functionality.

I simply knew we would need the extension capability that the Mdl class allows for sooner or later, I didn’t expect it to be this soon though. The main problem here is saving a many to many relationship straight to the database from the $_POST array, to do that we can extend Doctrine Record with a new function I have named fromArrayExt which adds something extra to the normal fromArray method.

He shows how to extend the classes to create custom handlers for a grouping of checkboxes. The new code automatically handles their submitted values and pushes them directly into the database (with a simple save() call).

tagged: doctrine record tutorial checkbox extend group

Link:

The Bakery:
New Tutorials - PHPTAL, Multiple Checkboxes, and counterCache
Apr 30, 2007 @ 21:04:22

In the CakePHP blog, The Bakery, there are three new items posted - all three tutorials on different topics:

  • The first is a tutorial that shows how to integrate PHPTAL templates into a Cake application (via a custom PhptalView class)
  • Next up is a simple one - the creation of a helper to work with multiple checkboxes in a form .
  • Lastly, there's a tutorial that shows an implementation for a counterCache object in a simple application.
Be sure to check out The Bakery for more great tutorials and articles like this.

tagged: cakephpframework tutorial article phptal checkbox countercache cakephpframework tutorial article phptal checkbox countercache

Link:

The Bakery:
New Tutorials - PHPTAL, Multiple Checkboxes, and counterCache
Apr 30, 2007 @ 21:04:22

In the CakePHP blog, The Bakery, there are three new items posted - all three tutorials on different topics:

  • The first is a tutorial that shows how to integrate PHPTAL templates into a Cake application (via a custom PhptalView class)
  • Next up is a simple one - the creation of a helper to work with multiple checkboxes in a form .
  • Lastly, there's a tutorial that shows an implementation for a counterCache object in a simple application.
Be sure to check out The Bakery for more great tutorials and articles like this.

tagged: cakephpframework tutorial article phptal checkbox countercache cakephpframework tutorial article phptal checkbox countercache

Link:


Trending Topics: