체크되어 있는지 확인하는 방법 :체크 박스/라디오 버튼이 나는이 html 코드가 PHP
<tr>
<td><label><input type="text" name="id" class="DEPENDS ON info BEING student" id="example">ID</label></td>
</tr>
<tr>
<td>
<label> <input type="checkbox" name="yr" class="DEPENDS ON info BEING student"> Year</label>
</td>
</tr>
을하지만 PHP를 사용하여 확인하는 경우 나는이 확인란을 선택 않는 방법에 대한 어떤 생각을 가지고 있지 않습니다 , 확인 된 값에 따라 해당 데이터를 출력 할 수 있습니다.
제발 도와주세요, 이런 식으로 생각합니다.
<?php
$con = mysql_connect("localhost","root","nitoryolai123$%^");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("school", $con);
$id = mysql_real_escape_string($_POST['idnum']);
if($_POST['id'] == checked & $_POST['yr'] ==checked){
$result2 = mysql_query("SELECT * FROM student WHERE IDNO='$id'");
echo "<table border='1'>
<tr>
<th>IDNO</th>
<th>YEAR</th>
</tr>";
while($row = mysql_fetch_array($result2))
{
echo "<tr>";
echo "<td>" . $row['IDNO'] . "</td>";
echo "<td>" . $row['YEAR'] . "</td>";
echo "</tr>";
}
echo "</table>";
}
mysql_close($con);
?>
이 암호는 실제 비밀번호입니까? 나는 희망하지 않는다 : – ZeissS