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?????

Welcome Spidermite.

<?php
foreach($_POST['fruit'] as $field => $value) 
{ 
echo $field, $value;
echo "<br />";
}
?>

Yes, that is it.
Thankyou thankyou thankyou.
I can stop beating my head on the floor now. My pulse is going down.

Thanks:icon_biggrin:

This question has already been answered. Start a new discussion instead.