Hi,

I need to get the process_id or process_name to select the reject type on the table reject_list. But I don't know how and is it possible that after I input the process_name I will get the value then it will be use in my select query to get the reject list.

Code:
<?php
  session_start();
  ob_start();
  date_default_timezone_set("Asia/Singapore");
  error_reporting(0);  
  include('connection.php');
  
 
//----QUERY FOR REJECT TYPE---//

if(isset($_SESSION['process_name']) != '')
{
    
    $process_id = $_SESSION['process_id'];
    $sql_reject = ("SELECT reject_process_id, reject_acro FROM reject_list WHERE reject_process_id = '$process_id'");

echo $sql_reject;
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<title>Operator's Shift Report </title>
<head>
<link rel="stylesheet" type="text/css" href="op_report.css" />
<link rel="stylesheet" type="text/css" href="calendar.css" />

<script type="text/javascript" src="jquery.js"></script>
<script type='text/javascript' src='jquery.autocomplete.js'></script>
<link rel="stylesheet" type="text/css" href="jquery.autocomplete.css" />

<script type="text/javascript">
//----auto complete process name---//
$().ready(function() {
    $("#process_name").autocomplete("get_process_list.php", {
       width: 205,
        matchContains: true,
        mustMatch: true,
        selectFirst: false
    });
    
    $("#process_name").result(function(event, data, formatted) {
        $("#process_id").val(data[1]);
    });
    
});


</script>
</head>
<body onload=document.getElementById("process_name").focus();>
<form>
<script type="text/javascript" src="calendar.js"> </script> 
<div id="operators_report">
<fieldset>
<legend><h1>Operator's Shift Report</h1></legend>
<table>
<tr>
<td>Process:</td>
<td><input type="text" name="process_name" id="process_name" value="" size="30"></td>
<td>Supervisor:</td>
<td><input type="text" name="supervisor" id="supervisor" value="" size="30"></td>
</tr>

</table>
</fieldset>
</div>
<input type="hidden" name="process_id" id="process_id" value="" />
<input type="hidden" name="spv_id" id="spv_id" value="" />
</form>
</body>
</html>
Any help is highly appreciated.

Thank you.