Is it possible to get form field values into an array? Example:
<?php
array('one', 'two', 'three');
?>
<form method="post" action="test.php">
<input type="hidden" name="test1" value="one" />
<input type="hidden" name="test2" value="two" />
<input type="hidden" name="test3" value="three" />
<input type="submit" value="Test Me" />
</form>
Is it possible to pass all form values no matter the number of them to the array in PHP?
It already is done.
Look at the
$_POSTarray.If you do a
print_r($_POST);you should see that it is an array.If you just need the values and not the key, use
Reference: $_POST