title: How do I take a value entered into a form, redirect to a page a php page that can retrieve that variable?
body: <p>I have two pieces I need to connect together</p>
  
  <p>1) A simple HTML form that collects a website url</p>
  
  <p>2) A PHP script that receives the url entered from the form.</p>
  
  <p>I have the PHP script finished but it only works if I hard-code the url value within the PHP script.  I don't understand how to transfer the url value from the html form to the PHP script.</p>
  
  <p>This is the form:</p>
  
  <pre><code>&lt;form id="dm" class="api"  method="post" action="apigenerate.php"&gt;
    &lt;input id="element_1" name="element_1" class="element text medium" type="text" maxlength="255" value=""/&gt; 
    &lt;input type="hidden" name="form_id" value="710370" /&gt;
    &lt;input class="button_text" type="submit" name="submit" value="Submit" /&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p>This is the API Script, on the 6th line is where the input value needs to go</p>
  
  <pre><code>&lt;?php
  $data = '
  {   
  "site_data":
  {                       
  " the form input goes here "
  }
  }
  ';
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, 'https://api.servername.com');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_USERPWD, "username:Ypassword");
  curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  curl_setopt($ch, CURLOPT_POST,1);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  curl_setopt($ch, CURLOPT_HTTPHEADER, array(                                                                             
  </code></pre>