Is it possible to make a cURL request using html textarea?
<p>Hi Im trying to develop an html application that can send request to a web server through the use of php cURL, my problem is whenever i test it out i get an error of a Reserved XML Name, Im using a form with a post method btw. </p>

<p>The weird thing is when I input the xml as string in php it works but through the use of html via post method I get that error. Isn't the input type value already a string so It should have the same results as the hardcoded xml string in php right? </p>

<p>The application uses the html file for UI so that users can edit the values inside the xml and through the use of post method it calls a cURL request inside my php script. was my approach wrong if so is there another method to make such requests?</p>

<p>sample of my code:</p>

<pre><code>if($_POST['option'] == "SmacMembers"){
  $member= ($_POST['gmember']);
  echo $member;
  $URL = "https://localhost/globe2smac-fh3/api/";
  $ch = curl_init($URL);
  curl_setopt($ch, CURLOPT_MUTE, 1);
  curl_setopt($ch, CURLOPT_USERPWD, "michael:kel");
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array('ContentType:text/xml'));
  curl_setopt($ch, CURLOPT_POSTFIELDS, $member);
  curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  $output = curl_exec($ch);
  curl_close($ch);
  echo $output;
  }
</code></pre>

<p>and the sample XML request via textarea</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE OlsRequestFormat SYSTEM "OlsRequestFormat.dtd"&gt;
&lt;methodCall&gt;
&lt;methodName&gt;smac.members&lt;/methodName&gt;
&lt;params&gt;
&lt;param&gt;
&lt;value&gt;
&lt;string&gt;
&lt;?xml version="1.0"?&gt;
&lt;globetosmac&gt;
&lt;functioncode&gt;smac_members&lt;/functioncode&gt;
&lt;cardnumber&gt;8880999521960565&lt;/cardnumber&gt;
&lt;transaction_id&gt;12345678&lt;/transaction_id&gt;
&lt;/globetosmac&gt;
&lt;/string&gt;
&lt;/value&gt;
&lt;/param&gt;
&lt;/params&gt;
&lt;/methodCall&gt;
</code></pre>
