I have a form with multiple fields, whereby fields can be added.
The FORM is as follows:
<form id="myForm" action="myfile.php" >
<input . . >
<select>. . . </select>
</form>
myfile.php has the following code:
foreach ($_POST as $key => $value) {
echo $key." takes the <b>".$value."</b> Value";
}
This simple code processes all the entries of the form regardless how many.
Now, what I want is:
When I click on the submit button, instead of sending the form's content to a script, to actually get that array and pass it AJAX without having to write every single key and its value manually.
I hope it makes sense