This is the MOD for the much requested “Allow user to select department”…
Open $TICKETS_HOME/open.php
Remove
$_POST['deptId']=
(only this, not the rest of the line)
Open $TICKETS_HOME/include/client/open.inc.php
Before the Subject
insert the following:
<td align="left"><b>Department:</b></td> <td> <select name="deptId"> <option value="" selected >Select Department</option> <? $services= db_query('SELECT dept_id,dept_name FROM '.DEPT_TABLE.' ORDER BY dept_name'); while (list($deptId,$dept) = db_fetch_row($services)){ $selected = ($info['deptId']==$deptId)?'selected':''; ?> <option value="<?=$deptId?>"<?=$selected?>><?=$dept?></option> <? }?> </select> <font class="error"><b>*</b> <?=$errors['deptId']?></font> </td> </tr>