i want to read in all the field names of a form to an array in php.
example of page i want to read:
Code:
<form method=post action="somepage.html">
Name <input type=text name="realname"> <br>
Email <input type=text name="email"> <br>
Comments <text area name="comments"></textarea>
</form>
i would like to read this page and read the field names into an array
PHP Code:
<?
$field[0]="name";
$field[1]="email";
$field[2]="comments";
?>
i will read the entire page into a variable, then i think this is the pattern i need to match
input=["]?[a-zA-Z_]+["]?\s
but i am not sure how i would bring all those matches into an array.