실제로 발생해야하는 것은 세션이 아래 나열된 드롭 다운에서 내 데이터를 가져옵니다. 프로세스 페이지로 이동 한 다음 프로세스 페이지에 헤더가있는이 페이지로 다시 이동합니다. 그런 다음 첫 페이지로 돌아 가면 해당 페이지를 떠날 때와 같은 세션 또는 클라이언트로 드롭 다운이 채워지고 드롭 다운의 변경 사항이 적용됩니다. 누구든지 이걸 도와 줄 수 있어요. 고마워요 지금이 드롭 다운에 클라이언트를 반환하지만 드롭 다운에 대한 onchange는 내가 실제로 일 해야하는 것은 작동하지 않습니다.PHP 드롭 다운 및 세션 질문
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>
프로세스 페이지 헤더
session_start();
$_SESSION['ClientNamefour'] = $_POST['txtclientcode'];
// Do the redirect
// Do the redirect
header("Location: test.php");
exit();
귀하의 궁금한 점은 무엇입니까? –
참고 사항 :