나는 PHP에 비교적 익숙하다. 내 웹 페이지의 경우 같은 페이지에 여러 페이지를로드해야한다. cwt.html이라는 기본 HTML 페이지가있다. 모든 확인란과 제출 버튼이 있습니다. 제출 버튼을 클릭하면 버튼을 제출하면, 다음 페이지는 .. (cwt.html의) 또한 같은 페이지에로드해야 선택한 체크 박스에 대한 관련PHP의 동일한 페이지에 여러 페이지로드하기
<html>
<head>
<title> Conditions We Treat </title>
</head>
<body>
<form id = form1 action = "processing1.php" method = "post">
<input type = "checkbox" name = "sickness[]" value = "Nausea">Nausea</input><br/>
<input type = "checkbox" name = "sickness[]" value = "Constipation">Constipation</input><br/>
<input type = "checkbox" name = "sickness[]" value = "vomiting">Vomiting</input><br/>
<div id = "submit1"><input type = "submit" name = "submit" value = "submit"></input></div><br/>
</form>
</body>
</html>
을 (processing.php 말) 이 웹 페이지에서 클릭 컨트롤이 processing1.php에 머리를해야하지만, 내용이 동일한 페이지
<html>
<head>
<title> Conditions We Treat </title>
</head>
<body>
<?php
echo "hi"
foreach($_POST['sickness'] as $s)
{
$con = mysqli_connect("localhost","root","","collofnursing");
//mysql_select_db("collofnursing");
$res = mysqli_query($con,"select * from condwetreat");
while($row = mysqli_fetch_array($res))
{
echo $s;?> <br><br><?php
}
}
?>
</body>
</html>
AJAX에 대해 알아보십시오. – dfsq
비록 JS 지원없이 불필요하게 깨진 웹 사이트를 만들지 않는 것이 예의입니다. – Eevee