around Line 910ish(depending on how much you have modified) in class.ticket.php, can you post this:
//We are ready son...hold on to the rails.
$extId=Ticket:();
$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)).
',location='.db_input(Format:($var)). // mod080722_new_ticket_field
',subject='.db_input(Format:($var)).
',phone='.db_input($var).
',ip_address='.db_input($ipaddress).
',source='.db_input($source);