이 시도 : 당신이 PHP를 분리하고 조금 더 html로하면
당신은 쉽게 시간을 가질 수있다.
<?php
if(isset($_POST['announcefiles'])){
// DO SOMETHING
}
?>
가 알려줘 : (다시 같은 페이지에 게시하는 경우 또는 형태 이상)
<form method="post" action="settings.php" onchange="this.form.submit()">
<fieldset>
<legend>Announce New Files:</legend>
<label for="on"><input type="radio" id="on" name="announcefiles" value="On" <?php echo $checkon1 ?> /> On</label>
<label for="off"><input type="radio" id="off" name="announcefiles" value="Off" <?php echo $checkoff1 ?> /> Off</label>
</fieldset>
</form>
그런 다음 settings.php에 PHP는 논리에서 당신은
announcefiles
의 값을 확인할 수 있습니다 이것이 도움이된다면. 아니면 내가 그 질문을 놓치고있다.
'echo'더미를 사용하는 대신'?>'과' php' 사이에 출력을 출력하는 것이 어떻습니까? – MaxArt
어떤 이유에서든 MaxArt의 조언을 따르지 않을 경우'heredocs'를 살펴볼 수도 있습니다. http://www.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc – brezanac