I have two forms in a page. Have decided to update my post with more realistic code from the page itself...
<form action="test.php" method="POST">
<strong>Details of work carried out</strong>
<textarea name="detailsOfWorkCarriedOut"></textarea>
<strong>Materials used</strong>
<textarea name="materialsUsed"></textarea>
<input type="hidden" name="submitted" value="true">
<input type="submit" value="Save">
<form/>
<br />
<form action="test.php" method="POST">
<strong>Details of work not carried out</strong>
<textarea name="detailsOfWorkNotCarriedOut"></textarea>
<input type="hidden" name="submitted" value="true">
<input type="submit" value="Save">
</form>
"test.php" simply contains:
<?php
print_r($_POST)
?>
No matter which form I post, I always get the same array returned:
Array ( [detailsOfWorkCarriedOut] => [materialsUsed] => [submitted] => true [detailsOfWorkNotCarriedOut] => )
Why is this?