This is driving me nuts!!!
I am passing a text array from a form to another file and trying to display the data. I have reduced the process to it's simplest form and still can not make it work.
FormSend.php:
<?php
echo '<form method="post" action="FormRecieve.php" name="Activate">
<input type="text" name="fruit[]" value="apple"/>
<input type="text" name="fruit[]" value="banana"/>
<input type="text" name="fruit[]" value="cherry"/>';
echo '<button value="sub" name="submit">Submit</button><br>';
echo '</form>';
?>
FormRecieve.php
<?php
foreach($_POST as $field => $value)
{
echo $field, $value;
echo "<br />";
}
?>
The result that get is:
fruitArray
submitsub
What the heck am I doing wrong?????