System:Form:save

From Aspen Documentation

Initiates the insert/update queries on incoming form data.

Since 1.0

Contents

Arguments

integer save ([integer $id = false])

id
Record id if updating an existing record.

Returns

Returns the insert id if adding new record, returns boolean if updating.

Notes

  • Obtains the table information from either loadRecord or loadTable.

Examples

Example:

$this->APP->form->loadTable('blog');
 
if($this->APP->form->isSubmitted()){
	if($this->APP->form->save()){
 
	}
}