
Umarım çözerim.
3
●551
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<?PHP
if($_POST) {
// gelen sipariş ve kategorilerini öğrenelim
for($i=1;$i<=10;$i++) {
if($_POST['urun'][$i]==$i) {
echo $_POST['urun'][$i]."-".$_POST['siparis'][$i]."<br>";
}
}
}
else {
echo'<form action="deneme.php" method="post">';
for($i=1;$i<=10;$i++) {
?>
Ürün <?PHP echo $i;?><input type="checkbox" name="urun[<?PHP echo $i;?>]" value="<?PHP echo $i;?>">
Küçük<input type="radio" name="siparis[<?PHP echo $i;?>]" value="1">
Orta<input type="radio" name="siparis[<?PHP echo $i;?>]" value="2">
Büyük<input type="radio" name="siparis[<?PHP echo $i;?>]" value="3"><br>
<?PHP
}
?>
<input type="submit" value="Sipariş ver">
<?PHP
echo'</form>';
}
?>
</body>
</html>
burdaki gibi bir yol izlemen lazım