Hi,
I have a problem, when i submit form and show success message, i coded save item in custom PHPcode at Before. But it saved twice item in database:
Image here:

How to fix it? thanks!!!
I have a problem, when i submit form and show success message, i coded save item in custom PHPcode at Before. But it saved twice item in database:
//======== save database ==========
if(!class_exists('Tablebook_downloads')){
class Tablebook_downloads extends JTable{
var $email = null;
var $items_id = null;
var $date_reg = null;
var $status = null;
var $active_code = null;
function __construct(&$database){
parent::__construct('nn9po_book_downloads', 'id', $database);
}
}
$record =& JTable::getInstance('book_downloads', "Table");
if(!$record->save($data)){
JError::raiseWarning(100, $record->getError());
}
}
Image here:

How to fix it? thanks!!!