Now for someone who has used the preg_match function I'm sure this is a simple question but I have not done anywork with it yet, so I'm finding my self a bit confused.
I've got a function that retrieves the Form elements from a given url and returns something like this
<form action=something.php method=post>
<input type=text name=field1 size=25>
<input type=text name=field2 size=40>
<input type=checkbox name=field3 value=yes>
<input type=checkbox name=field3 value=no>
etc.... Until form is done then Submit
<input type=submit value=Submit>
So it basically parses everything else form the page...what I'm trying to firgue out is how I can use preg_match_all to pull out all the input TYPES and NAMES of each element, so I can store them in my DB.
I'm pretty sure that PREG_match is the function I want to use but cannot seem to put together what I need?
I tried a couple of things like this
preg_match_all('/name="(.*?)"/i',$file,$matches);
where $file is the string of the FOrm info...but it's not working out for me? Any help is appreciated this seems to be a function I should learn the ins and outs of anyways.