Hello,
at first, sorry but my english is very bad.
i want followed:
a Member opened a Ticket and select a Staff.
thats my open.inc.php
<select name="topicId">
<option value="" selected >Bitte auswählen</option>
<?
$services= db_query('SELECT topic_id,topic FROM '.TOPIC_TABLE.' WHERE isactive=1 ORDER BY topic');
while (list($topicId,$topic) = db_fetch_row($services)){
$selected = ($info==$topicId)?'selected':''; ?>
<option value="<?=$topicId?>"<?=$selected?>><?=$topic?></option>
<?}?>
</select>
<font class="error">* <?=$errors?></font>
but here we can select dept.
On my new Code, i don't know what is wrong.
<select id="staffId" name="staffId">
<option value="0" selected="selected">-Bitte Anwalt auswälen-</option>
<?
//TODO: make sure the user's group is also active....DO a join.
$sql=' SELECT staff_id,CONCAT_WS(", ",lastname,firstname) as name FROM '.STAFF_TABLE.' WHERE isactive=1 AND onvacation=0 ';
$depts= db_query($sql.' ORDER BY lastname,firstname ');
while (list($staffId,$staffName) = db_fetch_row($depts)){
$selected = ($info==$staffId)?'selected':''; ?>
<option value="<?=$staffId?>"<?=$selected?>><?=$staffName?></option>
<?
}?>
</select><font class='error'> <?=$errors?></font>
Anybody helps?