I am planning on using osTicket for internal company support. I have created a query in order to fill a drop down list. The query fills the drop down list properly. However, I would like email and phone number information filled in automatically after selecting a user. I'm not sure on how to approach this at all. Any help at all is greatly appreciated. I'm also having a problem when I submit the ticket. The information shows up on the server, but the client never returns back to anything, it only leaves a blank page.
<?php
if(!defined('OSTCLIENTINC')) die('Kwaheri rafiki wangu?'); //Say bye to our friend..
$info=($_POST && $errors)?$_POST(); //on error...use the post data
?>
<?if($errors) {?>
<?=$errors?>
<?}elseif($msg) {?>
<?=$msg?>
<?}elseif($warn) {?>
<?=$warn?>
<?}?>
Please fill in the form below to open a new ticket.
Full Name:
Select One
<?$services= db_query('SELECT firstname,lastname,email,phone FROM '.STAFF_TABLE.' WHERE isactive=1 ORDER BY firstname');
while (list($firstname,$lastname,$emailtmp,$phonetmp) = db_fetch_row($services)){?>
<?=$lastname?>"><?=$firstname?> <?=$lastname?>
<?}?>
* <?=$errors?>
Email Address:
<?if ($thisclient && ($email=$thisclient->getEmail())) {
?>
"><?=$email?>
<?}else {?>
">
<?}?>
* <?=$errors?>
Help Topic:
<?
$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':''; ?>
"<?=$selected?>><?=$topic?>
<?}?>
* <?=$errors?>
Subject:
">
* <?=$errors?>
Message:
<? if($errors) {?> <?=$errors?>
<?}?>
<?=$info?>
<?
if($cfg->allowPriorityChange() ) {
$sql='SELECT priority_id,priority_desc FROM '.TICKET_PRIORITY_TABLE.' WHERE ispublic=1 ORDER BY priority_urgency DESC';
if(($priorities=db_query($sql)) && db_num_rows($priorities)){ ?>
Priority:
<?
while($row=db_fetch_array($priorities)){ ?>
" <?=$info==$row?'selected':''?> ><?=$row?>
<?}?>
<? }
}?>
<?if(($cfg->allowOnlineAttachments() && !$cfg->allowAttachmentsOnlogin())
|| ($cfg->allowAttachmentsOnlogin() && ($thisclient && $thisclient->isValid()))){
?>
Attachment:
<?=$errors?>
<?}?>