Formatting
Thanks for this, i noticed that there was no formatting, so i edited the code slightly to use the formatting class. Then i noticed if the field was blank, the css wasent written propperly. So i made sure it assign someone to the ticket on insert, there may be better ways for this but ive only been useing it a day or so :)
<? $employee_name=db_fetch_row(db_query('SELECT firstname FROM ost_staff where staff_id = \''.$row.'\'')); echo Format:($employee_name,30);?>
I also modifyed $sql to always assign a ticket to a chosen user, you could insert a dummy user with firstname 'none' to save time on changing the field from a INT and breaking other code..
$sql= 'INSERT INTO '.TICKET_TABLE.' SET created=NOW() '.
',ticketID='.db_input($extId).
',dept_id='.db_input($deptId).
',priority_id='.db_input($priorityId).
',staff_id=1'.
',email='.db_input($var).
',name='.db_input(Format:($var)).
',subject='.db_input(Format:($var)).
',phone='.db_input($var).
',ip_address='.db_input($ipaddress).
',source='.db_input($source);
Or you could always edit the database structure with;
ALTER TABLE `ost_ticket` CHANGE `staff_id` `staff_id` INT(10) UNSIGNED NOT NULL DEFAULT '1'
Hope this helps