Php curl doesn't submit form
<p>I want to make a php script that submits a form using curl.
I've seen the other questions regarding this, and tryed like on other answers but i get the same result</p>

<p>I have a simple form that echo the value submited</p>

<pre><code>&lt;form action="form.php" method="GET"&gt;
&lt;input type="text" name="name"/&gt;
&lt;input type="submit"&gt;
&lt;/form&gt;

&lt;?PHP
if (! empty($_GET['name'])){
   echo 'Hello, ' . $_GET['name'];
}
?&gt;
</code></pre>

<p>and here is the curl script</p>

<pre><code>$ch = curl_init();

  curl_setopt($ch, CURLOPT_URL, "http://www.mydom.com/form.php"); 
  curl_setopt($ch, CURLOPT_POST, true);
  curl_setopt($ch, CURLOPT_POSTFIELDS, array(
  'name' =&gt; 'Aname',
  'submit' =&gt; 'submit'
  ));
  curl_setopt($ch, CURLOPT_HEADER, false);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

  $result = curl_exec($ch);
  echo "$result";
</code></pre>

<p>The echoed result is just the form without the "hello  &amp; submitted value"</p>
