On the ticket creation page I am trying to add a section called "Staff Advisor". I added the name in the database with Id number, names, email address's and isactive. I have been able to have it work so it pulls up the list on the submit ticket page. What I need now is to have it enter it in the ticket database. Then when the email goes out I want it to add the email address of the "Staff Advisor" to the email list. Like an additional Manager or Admin.
<tr>
<th>Staff Advisor:</th>
<td>
<select name="staffnameId">
<option value="" selected >Select One</option>
<?
$services= db_query('SELECT staff_advisor_id,staffname FROM '.STAFFNAME_TABLE.' WHERE isactive=1 ORDER BY staffname');
if($services && db_num_rows($services)) {
while (list($staffnameId,$staffname) = db_fetch_row($services)){
$selected = ($info==$staffnameId)?'selected':''; ?>
<option value="<?=$staffnameId?>"<?=$selected?>><?=$staffname?></option>
<?
}
}else{?>
<option value="0" >General Inquiry</option>
<?}?>
</select>
<font class="error">* <?=$errors?></font>
</td>
</tr>
I think I added the code I put in above correctly. This is my first post. It is working so they can select it but I still need it to add it to the database and also to cc them when the emails go out.
PLEASE HELP