안녕하세요, 저는 "Form two is here"메시지가 다음 코드에 표시되지 않는 이유에 대해 단서를 알려줍니다. 나는 다음과 같은 구조로 긴 코드를 작성했다. 양식에 도움두 번째 양식 제출 캡처 문제 - PHP
<DOCTYPE html>
<html>
<head><title></title>
</head>
<body>
<div id="one" style="width:300px; background:gray;">
<form method="post" action="<?= $_SERVER['PHP_SELF'] ?>">
<input type="text" name="txt1" id="txt1">
<input type="submit" name="sendone" id="sendone" value="One">
</form>
</div>
<div id="two" style="width:300px; background:yellow;">
<?php
if(isset($_POST['sendone']))
{echo "<input type='submit' name='sendtwo' id='sendtwo' value='Two'>";}
if(isset($_POST['sendtwo']))
{echo "Form two is here!"; return;}
?>
</div>
</body>
</html>
sendtwo라는 이름의 버튼을 제출 양식에 속하지 않아. –
@Baba 당신이 그 선을 완전히 읽고 당신이 영어를 이해하기를 진심으로 바랍니다. "다음 구조에 긴 코드를 작성했습니다" –