Phprad Tutorial Pdf -

function AfterInsert($values) mail('admin@example.com', 'New Product', $values['name']); return true;

function Validate(&$values) if(strlen($values['name']) < 3) $this->SetError('name', 'Name too short'); return false; return true; phprad tutorial pdf

Example: Send email after product insertion: function AfterInsert($values) mail('admin@example

Use the global $db object anywhere: