I am using DOMCrawler in PHP. I have the HTML below. I need to be able to select the option "Text1", and submit the form. I have the following code but I can't seem to make it work... What am I doing wrong?
use Goutte\Client;
$client = new Client();
$crawler = $client->request('GET', 'http://myURL');
$form = $crawler->selectButton('Text1')->form();
$crawler2 = $client->submit($form);
This is the HTML:
<form action="something.php" name="frmOpcion" id="frmOpcion" method="post" enctype="multipart/form-data">
<select name="cmbOpcion" id="cmbOpcion" class="textoCmb">
<option value="a">Text1</option>
<option selected="selected" value="b">Text2</option>
</select>
<input type="image" name="imgOpcion" id="imgOpcion" alt="Send" title="Send" src="goTo.gif">
</form>