I do save it like anyone else would - the only "sanitization" I do is $this->cleanUpFields()
Firstname and Lastname are two different fields - they aren't combined. They relate to two different columns in a table (Contact.firstname and Contact.lastname) that are not supposed to be blank. Chris: The Session "flash" command will display the message you pass it in the template where you place this: <?php if (isset($this->controller->Session)) $this->controller->Session->flash(); ?> It's a way to communicate to the user that the action either succeeded or failed. I'm surprised you haven't seen this - Cake's Bakery script generates session flashes for all it's CRUD functions. -Brian Chris Hartjes wrote: > On 10/25/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > > Ok - here's the code snips. > > > > http://bin.cakephp.org/view/1298589871 > > > > Hey kungfoofool, > > Your code looks pretty straightforward. Looks like you save all the > data like anyone else would. I think it would also be good to see the > form you've created because it's not clear in my mind what the problem > here really is. You've got two fields (firstname and lastname) and > I'm assuming you are sticking them into, what, one input field for > editing? > > I'd imagine you'd want to do something like $name = $firstname . ' ' . > $lastname and then pass that $name variable in as the default value > for the input field. > > Can someone explain to me the purpose of this line: > > $this->Session->setFlash($Contact['Contact']['firstname'] . '' . > $Contact['Contact']['lastname'] . ' has been removed.'); > > $this->Session->setFlash($Contact['Contact']['firstname'] . ' ' . > $Contact['Contact']['lastname'] . ' has been removed.'); > > I haven't dealt much with sessions and 'flash' stuff. > > Hope that helps. > > -- > Chris Hartjes > > "The greatest inefficiencies come from solving problems you will never have." > -- Rasmus Lerdorf > > @TheBallpark - http://www.littlehart.net/attheballpark > @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---