how to write $_POST method for each text input

paulF

New Member
I have a bunch on table rows where each row will contain a bunch text inputs. Now below is the name attributes for the possible inputs which contains its own value in each table row:\[code\]answerAvalue = http://stackoverflow.com/questions/12809282/AanswerBvalue = BanswerCvalue = CanswerDvalue = DanswerEvalue = E... //all the way to answerZvalue = ZanswerTruevalue = TrueanswerFalsevalue = FalseanswerYesValue = YesanswerNovalue = No\[/code\]Each table row also contains some radio buttons which are below:\[code\]<input type="radio" name="reply" />= = Single<input type="radio" name="reply" />= = Multiple\[/code\]So lets say I go through each table row and retrieve the values of each radio button selected in each row, then the code for this is below:\[code\]$i = 0;$c = count($_POST['gridValues']); //counts number of appended rowsfor($i = 0; $i < $c; $i++ ){switch ($_POST['reply'][$i]){ case "single": $selected_reply = "Single"; break; case "multiple": $selected_reply = "Multiple"; break; default: $selected_reply = ""; break; }\[/code\]But what my question is that because each text input has its own name attribute, then how can I write the code to achieve the same as above but for obviously for the text inputs?
 
Back
Top