1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| <?php
if (isset($_POST['envoyer']))
{
$in_checked = implode(",",$_POST['ID']);
$sql = "SELECT * FROM matable WHERE id IN (".$in_checked.")";
echo $sql;
}
?>
<html>
<head>
<title></title>
</head>
<body>
<div>
<form action='#' method="post">
<p>
<input type="checkbox" name="ID[]" value = "id1">
<input type="checkbox" name="ID[]" value = "id2">
<input type="checkbox" name="ID[]" value = "id3">
<input type="submit" value = "envoyer" name="envoyer" />
</p>
</form>
</div>
</body>
</html> |