Hi i have a lot of input in my form some of them are radio button and others are text and textbox. I am getting all of these values with
foreach ($_POST as $name => $val)
{
//for example if post type==radio
//there is some insertion codes to db in here $name,$val...
}
but i want use that insertion if post value is radio button. How can i do it?
my form looks like
<form method="post" action="<?=$_SERVER['REQUEST_URI']?>">
.
.
.
//a lot of table,tr,td,input,etc. in this part
.
.
.
<td style="border-style:solid; border-width:2px 1px 1px 2px"><input type="radio" class="metalYayaKorkuluk_Deformasyon" name="metalYayaKorkuluk_Deformasyon" style="width:100%; margin:0px; display:table-caption" value="1" /></td>
<td style="border-style:solid; border-width:2px 1px 1px 1px"><input type="radio" class="metalYayaKorkuluk_Deformasyon" name="metalYayaKorkuluk_Deformasyon" style="width:100%; margin:0px; display:table-caption" value="2" /></td>
<td style="border-style:solid; border-width:2px 1px 1px 1px"><input type="radio" class="metalYayaKorkuluk_Deformasyon" name="metalYayaKorkuluk_Deformasyon" style="width:100%; margin:0px; display:table-caption" value="3" /></td>
<td style="border-style:solid; border-width:2px 2px 1px 1px"><input type="radio" class="metalYayaKorkuluk_Deformasyon" name="metalYayaKorkuluk_Deformasyon" style="width:100%; margin:0px; display:table-caption" value="4" /></td>
<td style="border-style:solid; border-width:1px 1px 2px 2px"><input type="radio" class="plastikKaplama4" name="plastikKaplama4" style="width:100%; margin:0px; display:table-caption" value="1" <?php echo ($plastikKaplama4=='1')?'checked':'' ?>/></td>
<td style="border-style:solid; border-width:1px 1px 2px 1px"><input type="radio" class="plastikKaplama4" name="plastikKaplama4" style="width:100%; margin:0px; display:table-caption" value="2" <?php echo ($plastikKaplama4=='2')?'checked':'' ?>/></td>
<td style="border-style:solid; border-width:1px 1px 2px 1px"><input type="radio" class="plastikKaplama4" name="plastikKaplama4" style="width:100%; margin:0px; display:table-caption" value="3" <?php echo ($plastikKaplama4=='3')?'checked':'' ?>/></td>
<td style="border-style:solid; border-width:1px 2px 2px 1px"><input type="radio" class="plastikKaplama4" name="plastikKaplama4" style="width:100%; margin:0px; display:table-caption" value="4" <?php echo ($plastikKaplama4=='4')?'checked':'' ?>/></td>
<input id='elm2' type="submit" name="save2" value="Submit" />
</form>
to summerize im trying to get all of name and its value of selected radio button with foreach but i dont want to get other intputs such as text and textarea.