Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <input type="text" name="songfld[901]" value="">
  2. <textarea name="data[901][name]" id="txt-901" rows="2" cols="80"></textarea>
  3.  
  4. <input type="text" name="songfld[902]" value="">
  5. <textarea name="data[902][name]" id="txt-902" rows="2" cols="80"></textarea>
  6.  
  7. foreach($_POST['songfld'] as $val){
  8. $val is the value from input
  9. $id = $_POST['songfld'][0]; // the number in each name="songfld[X]"
  10. $namefld = $_POST['data'][$id]['name']; // gives the value from textarea
  11.  
  12. echo "<P>$id $idfld $namefld";
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement