Geekinator.com

Entries for the ‘PHP’ Category

A field not saving in CakePHP? Try clearing the cache :)

I thought I’d pass a little tip along for those of you who use the CakePHP framework, and maybe don’t know all the ins and outs yet (I am definitely one of those people, but I’m getting there). Every once in a while, I’ll get stuck on something that just won’t save to the database, [...]

Validate Multiple Models at same time when using CakePHP Wizard component

I really like the CakePHP Wizard component, written by Jared Hoyt and can be found at http://bakery.cakephp.org/articles/jaredhoyt/2010/09/10/wizard-component-1-2-tutorial#page-2. It’s great for creating multi page web forms in CakePHP, but I did run across a little problem (I’m sure it’s not a glitch with the component, but just a problem I’m having with my situation). The problem [...]

Populate State List on Country Select in CakePHP using jQuery

This has been shown on many sites, but it took the combination of several articles for me to figure this one out…maybe it’s just me, dunno. Also, it drove me nuts how the states list would disappear if the page was refreshed. I learned how to handle that as well, using jQuery cookies. By the [...]

Save output of print_r to variable instead of displaying it

I found this on someone else’s site (at http://www.electrictoolbox.com/return-information-from-php-print-r/) and thought I’d share it here as well. Something I’ve been wondering about for years and never really figured out how to do, was how to save the output of the print_r command to a variable, instead of actually displaying the contents to the screen. As [...]

  
Web Analytics