How to Get the Values of All Checked Checkboxes With jQuery (and Send Them to PHP)

One line of jQuery collects every ticked checkbox in a group. Here is that line, the plain JavaScript version, and how to send the values to PHP as a real array.

One line of jQuery collects every ticked checkbox in a group. Here is that line, the plain JavaScript version, and how to send the values to PHP as a real array.

Two ways to link an image in CakePHP: the url option on image(), or image() inside link() with escaping turned off. Here is when to use each.

Need the current page URL for a login redirect, canonical tag or share link? These are the calls that work in CakePHP 4 and 5, plus the older 1.3 and 2.x versions.

Stale cache can make code changes look like they did nothing. Here is how to switch caching off in each CakePHP version, for the whole app or just one cache config.

Instead of calling $this->set() once per variable, pass compact() or an array and send them all at once. It works the same from CakePHP 1.x to 5.

AJAX responses should not come wrapped in your full page layout. Here is how to turn the layout off for one action in each CakePHP version, and how to return JSON cleanly.

Need the Users table inside ArticlesController? In CakePHP 5 call fetchTable(). Here is the right method for each version and why $uses fell out of favour.

Elements that hit the database on every page add up. Caching the rendered HTML fixes that. Here is the syntax for each CakePHP version, how to pick cache keys, and how to clear them.
If an old site still calls PayPal NVP methods, this maps each one to its REST API replacement and shows a minimal PHP flow to create and capture an order.

Elements are reusable chunks of view code in CakePHP. Here is where the files go in each version, how to include one, and how to pass data and options to it.