/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// $error = false; // validate the row // $this->set($data); // if (!$this->Member->validates()) // { // $this->_flash(__(sprintf('Post for Row %d failed to validate.',$i), true),'warning'); // $error = true; // } // save the row // if (!$error && !$this->Member->save($data)) // { // $this->Member->_flash(__(sprintf('Post for Row %d failed to save.',$i), true),'warning'); // } // save the row // if (!$error) // { // // for more info on _flash() please visit: // // http://mrphp.com.au/node/1820 // $this->Member->_flash(__(sprintf('Post for Row %d was saved.',$i), true),'success'); // }