static function save($option, $pkg) { $database = JFactory::getDBO(); $row = new facileFormsPieces($database); // bind it to the table if (!$row->bind($_POST)) { echo "<script> alert('" . $row->getError() . "'); window.history.go(-1); </script>\n"; exit; } // if // store it in the db if (!$row->store()) { echo "<script> alert('" . $row->getError() . "'); window.history.go(-1); </script>\n"; exit; } // if JFactory::getApplication()->redirect("index.php?option={$option}&act=managepieces&pkg={$pkg}"); }
function save($option, $pkg) { $database = JFactory::getDBO(); $row = new facileFormsPieces($database); // bind it to the table if (!$row->bind($_POST)) { echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>\n"; exit(); } // if // store it in the db if (!$row->store()) { echo "<script> alert('".$row->getError()."'); window.history.go(-1); </script>\n"; exit(); } // if JFactory::getApplication()->redirect( "index.php?option=$option&act=managepieces&pkg=$pkg", BFText::_('COM_BREEZINGFORMS_PIECES_SAVED')); } // save