title: put user form input into php variable and send mail
body: <p>I'd like to send the user a copy of the contact form that they submit. I've got this php code:</p>
  
  <pre><code>$formproc-&gt;AddRecipient('webmaster@somewhere.com');
  </code></pre>
  
  <p>and this front-end code:</p>
  
  <pre><code>&lt;form id='contactsensei' action='&lt;?php echo $formproc-&gt;GetSelfScript(); ?&gt;' method='post' accept-charset='UTF-8'&gt;
  &lt;fieldset&gt;
  
  &lt;input type='hidden' name='submitted' id='submitted' value='1'/&gt;
  &lt;input type='hidden' name='&lt;?php echo $formproc-&gt;GetFormIDInputName(); ?&gt;' value='&lt;?php echo $formproc-&gt;GetFormIDInputValue(); ?&gt;'/&gt;
  &lt;input type='text'  class='spmhidip' name='&lt;?php echo $formproc-&gt;GetSpamTrapInputName(); ?&gt;' /&gt;
  
  &lt;div class='container'&gt;
      &lt;label for='email' &gt;*E-mail:&lt;/label&gt;&lt;br/&gt;
      &lt;input type='text' name='email' id='email' value='&lt;?php echo $formproc-&gt;SafeDisplay('email') ?&gt;' maxlength="50" /&gt;&lt;br/&gt;
      &lt;span id='contactsensei_email_errorloc' class='error'&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How do I get the e-mail that the user inputs and add it to the recipients address? I get it in theory, get the user input info and put it in a variable so it end's up something like</p>
  
  <pre><code>$uemail = $_POST[uemail];
  $formproc-&gt;AddRecipient('webmaster@somewhere.com, $useremail');
  </code></pre>
  
  <p>It's obviously not working. Little help. Thanks.</p>
  
  <p>==</p>
  
  <p>Ugh, thought I fixed it because it works, but apparently it works with errors. I have it now with </p>
  
  <pre><code>$uemail = $_POST['email'];
  $formproc-&gt;AddRecipient('webmaster@somewhere.com'); //&lt;&lt;---Put your email address here
  $formproc-&gt;AddRecipient($uemail);
  </code></pre>
  
  <p>Again it works, but I'm getting this error: 
  <strong>Notice: Undefined index: email in C:\wamp64\www\scripts\contact\contactus.php on line 19</strong></p>
  
  <p>which I have not seen before. My functions are coming from a custom fgcontactform.php if that matters. What / where is it asking me to define? </p>