What really needs to happen here is.. A session takes my data from the drop down listed below. Its gonna take it to the process page then bring it back to this page with a header on the process page. Then when it gets back to the first page the dropdown will populate with the session or the same client as when I left that page and the on change of the drop down will work. Can anyone help me with this. Thank you Right now this returns the client to the drop down but the onchange for the drop down does not work which is what I really need to work.
session_start();
$current = isset($_SESSION['ClientNamefour']) ? $_SESSION['ClientNamefour'] : 0;
while ($row = mysql_fetch_array($result)) {
$id = $row["Client_Code"];
$thing = $row["Client_Full_Name"];
$value = "$id, $thing";
$sel=($id==$current)?'SELECTED':'';
$options4.="<OPTION $sel VALUE=\"$value\">".$thing;
}
?>
<form name="form" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<select name="ClientNamefour" onchange="this.form.submit()">
<option value=0>Client
<?php echo $options4?>
</select>
</form>
Process page header
session_start();
$_SESSION['ClientNamefour'] = $_POST['txtclientcode'];
// Do the redirect
// Do the redirect
header("Location: test.php");
exit();