i need help with in my code. i want to email an array. the html code is this
<!DOCTYPE html>
<html>
<head>
<title></title>
<style>
#hidden{
display:none;
}
</style>
<script>
function addFields(){
var number = document.getElementById("member").value;
if(number>10)
{
alert("not more than 10 batches");
}
else{
var container = document.getElementById("container");
while (container.hasChildNodes()) {
container.removeChild(container.lastChild);
}
for (i=0;i<number;i++){
container.appendChild(document.createTextNode("Flavor " + (i+1)));
var input = document.createElement("input");
input.type = "text";
input.name="member[]";
container.appendChild(input);
container.appendChild(document.createElement("br"));
}
}
}
function addFillings(){
var number = document.getElementById("member").value;
if(number>10)
{
alert("not more than 10 batches");
}
else{
var cont = document.getElementById("filling");
while (cont.hasChildNodes()) {
cont.removeChild(cont.lastChild);
}
for (i=0;i<number;i++){
cont.appendChild(document.createTextNode("Filling " + (i+1)));
var inp = document.createElement("input");
inp.type = "text";
inp.name="member[]";
cont.appendChild(inp);
cont.appendChild(document.createElement("br"));
}
}
}
function addFrostings(){
var number = document.getElementById("member").value;
if(number>10)
{
alert("not more than 10 batches");
}
else{
var cont = document.getElementById("frosting");
while (cont.hasChildNodes()) {
cont.removeChild(cont.lastChild);
}
for (i=0;i<number;i++){
cont.appendChild(document.createTextNode("Frosting " + (i+1)));
var inp = document.createElement("input");
inp.type = "text";
inp.name="member[]";
cont.appendChild(inp);
cont.appendChild(document.createElement("br"));
}
}
}
function call()
{
addFields();
addFillings();
addFrostings();
}
function toggleTable()
{
var elem=document.getElementById("hidden");
if (elem) {
elem.style.display="block";
call();
}
else {
elem.style.display="none";
}
}
</script>
</head>
<body>
<form method="post" action="dynamic.php">
<input type="text" id="member" name="member[]" value="">Number of Batches: (max. 10)<br />
<a href="#" id="filldetails" onclick="toggleTable()">Enter Flavors</a>
<div id="hidden">
<h2> Flavors</h2>
<div id="container"/>
</div>
<h2>Fillings</h2>
<div id="filling"/>
</div>
<h2>Frostings</h2>
<div id="frosting"/>
</div>
<input type="submit" value="submit">
</div>
</form>
</body>
</html>
i need help with it kindly some one post the php email code to pass all this array