다음 PHP 코드가 있습니다. 데이터베이스에서 "틱"된 선택한 값을 유지하도록 확인란을 수정 한 다음 다시 인쇄하려면 어떻게합니까?체크 박스가있는 PHP 양식
<?php
if (isset($_GET['success']) === true && empty($_GET['success'])===true){
echo'Updated Sucessfuly!';?>
<?php
}else{
if(empty($_POST) === false && empty($errors) === true){
$update_data_profile_career = array(
'Consulting' => $_POST['Consulting'],
'user_id' => $session_user_id,
);
update_user_profile_career($session_user_id, $update_data_profile_career);
header('Location: profile_update_career_goal.php?success');
exit();
}else if (empty($errors) === false){
echo output_errors($errors);
echo'</br></br>';
}
?>
<input type="checkbox" name="Consulting[]" value="<?php echo $user_data_profile_career['Consulting']; ?>" />Consulting
당신이 만들고 싶어 체크 박스를 확인하기 위해
checked='checked'
를 사용할 수있는'데이터베이스 반환 된 값에 따라 선택 checkbox'? – Gerep양식에서 선택하고 다음에 다시 열어 양식을 열어 선택할 때 – 33528
입력 배열을 사용하는 이유는 무엇입니까? 컨설팅 체크 박스가 두 개 이상 있습니까? – Uby