title: cURL and Paypal not working
body: <p>I'm using a form to send the item_name of the donation and the amount to a local PHP script on the page, however, the script just sends me to paypal.com and not the donation page.
  I see nothing wrong, it all checks out but doesn't do it's job. Here's the local script:</p>
  
  <pre><code>&lt;?php
      function datapost($URLServer,$postdata)
      {
      $agent = "Mozilla/5.0";
  
      $cURL_Session = curl_init();
  
      curl_setopt($cURL_Session, CURLOPT_URL,$URLServer);
  
      curl_setopt($cURL_Session, CURLOPT_USERAGENT, $agent);
  
      curl_setopt($cURL_Session, CURLOPT_POST, 1);
  
      curl_setopt($cURL_Session, CURLOPT_POSTFIELDS,$postdata);
  
      curl_setopt($cURL_Session, CURLOPT_RETURNTRANSFER, 1);
  
      curl_setopt($cURL_Session, CURLOPT_FOLLOWLOCATION, 1);
  
      $result = curl_exec ($cURL_Session);
  
      }
  
  
  
      $htmlsource= datapost("https://www.paypal.com/cgi-bin/webscr","cmd=_donations&amp;business=example@msn.com&amp;notify_url=http://example.net/donate/paypal.php?action=ipn&amp;return=http://example.net/donate/thankyou.php&amp;rm=2&amp;no_note=1&amp;cbt=Back&amp;no_shipping=1&amp;lc=US&amp;currency_code=USD&amp;item_name=".$_POST['item_name']."&amp;amount=".$_POST['amount']."&amp;bn=PP-DonationsBF:btn_donate_LG.gif:NonHostedGuest");
      ?&gt;
  </code></pre>
  
  <p>And the form which sends it:</p>
  
  <pre><code>    &lt;form action="http://example.net/beta/index.php" method="post" class="payPalForm" id="paypal"&gt;
          &lt;div&gt;
                    &lt;div class="formRow"&gt;
                     &lt;div class="hidden" id="error" style="width:100%"&gt;&lt;h3&gt; I'm sorry, that STEAM ID you entered was incorrect.&lt;/h3&gt;&lt;/div&gt;
                          &lt;/div&gt;
                  &lt;div class="formRow"&gt;
  
                  &lt;label for="field0"&gt;
                     Steam ID&lt;span class="star"&gt;*&lt;/span&gt;:                &lt;/label&gt;
                                          &lt;input type="text" name="item_name" id="item_name" class="textField required" /&gt;
  
                  &lt;/div&gt;
  
  
                  &lt;div class="formRow"&gt;
  
                  &lt;label for="field2"&gt;
                      Amount:                &lt;/label&gt;
  
                          &lt;select name="amount" id="field2" class="select"&gt;                    
                                                          &lt;option  value="5"&gt;$5&lt;/option&gt;
                                                              &lt;option  value="10"&gt;$10&lt;/option&gt;
                                                              &lt;option  value="15"&gt;$15&lt;/option&gt;
                                                              &lt;option  value="20"&gt;$20&lt;/option&gt;   
                                                              &lt;option  value="25"&gt;$25&lt;/option&gt;
                                                              &lt;option  value="30"&gt;$30&lt;/option&gt;
                                                              &lt;option  value="35"&gt;$35&lt;/option&gt;                                                            
                          &lt;/select&gt;
  
                  &lt;/div&gt;
  
              &lt;div class="formRow"&gt;
             &lt;input type="submit" value="Donate" id="donatebtn" onclick="return verifySteamID()" /&gt;
          &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>It does send to the script otherwise it wouldn't be able to go to paypal.com because that is not stated anywhere else. I don't understand why it's not working, any ideas?</p>