title: jquery ajax post email field
body: <p>I'm not sure why I'm not able to post the content of email field, </p>
  
  <p>here is my code. </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script src="//code.jquery.com/jquery-1.11.2.min.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;input type="text" id="email" name="email"&gt;
      &lt;input type="button" id="submit" name="submit" value="submit"&gt;
  &lt;/body&gt;
  
  &lt;script type="text/javascript"&gt;
  
  $(document).ready(function () {
  
      $('#submit').click(function (event) {
          var email = $('#email').val();
          console.log(email),
          $.ajax({
              url: 'db.php',
              type: 'POST',
              data: 'email=' + 'email',
              success: function (data) {
                  console.log(data);
              }
          })
      });
  
  });
  
  &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>backend file "db.php"</p>
  
  <pre><code> &lt;?php  
   $email = $_POST['email'];
   echo "$email";
  </code></pre>
  
  <p>I'm able to console.log email, and displays correctly, before it gets submitted to db.php. </p>
  
  <p>console log returns "email" only. </p>
  
  <p>Not sure whats wrong, your help is highly appreciated. </p>
  
  <p>Thanks </p>