title: Referring to id that had class associated with it (phpmailer)
body: <p>I'm trying to get a value from my html file for my phpmailer email but keep getting an unidentified index error. </p>
  
  <p>the html for it is:</p>
  
  <pre><code>&lt;label for="signature"&gt;&lt;/label&gt;
  &lt;input type="text" placeholder="Signature:" name="signature" id ="signature" class="amatic"&gt;
  
  
  &lt;button type="button"  id = "info" onclick="changeFont()"&gt;Confirm Signature&lt;/button&gt;
  </code></pre>
  
  <p>The js associated with it is: </p>
  
  <pre><code>&lt;script&gt;
  function changeFont() {
    var fon = document.getElementById("signature");
    if (fon.className == "amatic") {
      fon.className = 'roman';
    } else {
      fon.className = 'amatic';
    }
  }
  &lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
      $(function(){
          $('#info').click(function() {
              $(this).hide();
              signature.disabled = true;
  
          });
  
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>So basically, when the user confirms their signature the font will change to a signature style and they can no longer edit that field.</p>
  
  <p>When I try to call the value in Php for the email body by doing:</p>
  
  <pre><code>Signature: {$_POST['signature']}
  </code></pre>
  
  <p>I get the unidentified index error. Now it works when I get rid of the class, so my question how do I get the value for my email with the class associated with it? </p>
  
  <p>I tried <code>{$_POST['signature.roman']}</code> but get an error with that as well. I've tried researching it but can't seem to find anything</p>
  
  <p>Hope that makes sense, thanks in advance</p>
  
  <p>Edit: The html is part of a form as so:</p>
  
  <p></p>
  
  <p>When they finish the form and hit submit at the bottom of that page application.php runs.</p>
  
  <p>The rest of the email sends which is why I'm confused as to why I get the error with the signature id, unless I'm missing something completely obvious?</p>
  
  <p>Edit: php code now deleted</p>