<?php
if (isset($_REQUEST['do']))
{
$checkArray =$_POST['onay'];
$count =count($checkArray);
for($i=0;$i<$count;$i++)
{
if (isset($checkArray[$i]))
{
echo $checkArray[$i]."secili<br>";
}
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
</head>
<body>
<form action="check.php?do=check" method="post">
<input type="checkbox" name="onay[]" value="1">
<input name="domates" type="text">
<input type="checkbox" name="onay[]" value="2">
<input name="domates" type="text">
<input type="submit" name="button" id="button" value="Submit" />
</form>
</body>
</html>
sadece seçiliyi verir onunla işlem yapabilirsin.
Peki birden fazla seçili varsa.