If you look at this following code:
$sql= 'INSERT INTO '.TICKET_TABLE.' SET created=NOW() '.
',ticketID='.db_input($extId).
',dept_id='.db_input($deptId).
',priority_id='.db_input($priorityId).
',email='.db_input($var).
',name='.db_input(Format:($var)).
',subject='.db_input(Format:($var)).
',topic='.db_input(Format:($topicDesc)).
',phone="'.db_input($var).
'",phone_ext='.db_input($var?$var:'').
',ip_address='.db_input($ipaddress).
',source='.db_input($source);
and take a look at this section:
',subject='.db_input(Format:($var)).
Does it make sense for you?
Sincerley,
Masino Sinaga