Ok
Thanks to JPowers i now have a clients database added to OS Ticket.
This allows me to use a pull down menu when creating a new ticket to select the client which it is for. But.... I am now trying to find some code that would make it so when i select a client from the pull down list it automatically fills in the "Email" Field with the email address saved for that client in the database.
I hope this makes sense!
Below is the code for the email field i want auto generated and the pull down menu i have used, maybe this will help to explain what i am looking for.
<tr>
<td align="left" nowrap width="20%"><b>Email Address:</b></td>
<td>
<input type="text" id="email" name="email" size="25" value="<?=$info?>">
<font class="error"><b>*</b> <?=$errors?></font>
<? if($cfg->autoRespONNewTicket()) {?>
<input type="checkbox" name="alertuser" <?=(!$errors || $info)? 'checked': ''?>>Send Alert.
<?}?>
</td>
</tr>
<th width="20%">Client:</th>
<td>
<select name="name">
<option value="0">Select One</option>
<? $services= db_query('SELECT firstname,lastname FROM '.CLIENT_TABLE.' ORDER BY firstname');
while (list($firstname,$lastname) = db_fetch_row($services)){?>
<option value="<?=$firstname?> <?=$lastname?>" <?
if($_POST==$firstname." ".$lastname) echo 'selected="selected"';
?>><?=$firstname?> <?=$lastname?></option>
<? } ?>
</select>
<font class="error">* <?=$errors?></font>
</td>
</tr>
<tr height=2px><td align="left" colspan=2 > </td</tr>
<tr>
As usual any help appreciated!!