Update error checks
use get_id() in the SQL statement
Update the rule_id data var after SQL insert