So, I have a form containing 4 inputs, 2 texts, 2 hidden. I took two text input values ββfrom the name, which (get_me_two, get_me_three), and I also captured the form action (get_me.php). What I'm looking for now is to capture 2 hidden entrances, but not the values. I want to capture the entrances themselves.
EG: Here is my form:
<form action="get_me.php" method="post"> <input type="text" name="get_me_two"> <input type="text" name="get_me_three"> <input type="hidden" name="meta_required" value="from"> <input type="hidden" name="meta_forward_vars" value="0"> </form>
And what I want to get from here is two hidden inputs, not values, a complete line.
I'm not sure how to capture them with: PHP Simple HTML DOM Parser if anyone knows how cool it is, if not, if there is an alternative that would also be great. As soon as I captured them, I plan to transfer 2 input values ββto another page with hidden lines and, of course, the action of the form.
Also, if anyone is interested in my full code, which includes the simple html dom functionality.
<?php include("simple_html_dom.php"); // Create DOM from URL or file $html = file_get_html('form_show.php'); $html->load(' <form action="get_me.php" method="post"> <input type="text" name="get_me_two"> <input type="text" name="get_me_three"> <input type="hidden" name="meta_required" value="from"> <input type="hidden" name="meta_forward_vars" value="0"> </form>'); // Get the form action foreach($html->find('form') as $element) echo $element->action . '<br>'; // Get the input name foreach($html->find('input') as $element) echo $element->name . '<br>'; ?>
So, the final result will capture 3 values, and then 2 hidden inputs (full lines). Help would be greatly appreciated as it made me breathe a little while trying to achieve this.
user676853
source share