I have a basic form as follows:
Code:
<form action="myForm_submit.php" method="post" accept-charset="utf-8" name="myForm">
<input type = "text" name="firstName" />
<input type = "text" name="lastName" />
<input type="submit" value="Submit">
</form>
And I have a javascript array:
Code:
myArray = ["bananas", "apples", "pears", "peaches", "oranges"];
When I hit submit and send my form data I would like to send myArray in JSON format to my php submit file. How would I do that and how would I code the php $_POST = ..... for my JSON array?