cakephp, set 1 to webstuff field if these keywords matches

Posted by user259546 on Stack Overflow See other posts from Stack Overflow or by user259546
Published on 2010-06-07T16:09:41Z Indexed on 2010/06/07 16:12 UTC
Read the original article Hit count: 187

Filed under:
|
|

this is what i have so far

function contact() {
    if (!empty($this->data)) {

$this->Contact->create(); if ($this->Contact->save($this->data)) { if($this->data['Contact']['comments'] == ' website,newsleter etc '){ $this->Contact->saveField('webstuff', 1); } $this->Session->setFlash('done'); $this->redirect('/'); } else { $this->Session->setFlash('faild'); }

}

}

© Stack Overflow or respective owner

Related posts about php

Related posts about cakephp