title: How To Get The Value of an input field using AJAX and Pass it To A PHP String?
body: <p>I am new to JavaScript, so pardon my lack of knowledge.  </p>
  
  <p>I am trying to code a contact form and want to get the value entered in a particular input text field as soon as a value entered by the visitor using AJAX and pass it to a PHP string so that I can show relevant information based on the value entered before hitting the submit button.</p>
  
  <p>How Can I do that <strong>using jQuery</strong>?</p>
  
  <p>Here are the codes I am using for the form:</p>
  
  <pre><code>&lt;form method="post" action=""&gt;
  &lt;input type="text" id="name" name="name" /&gt;
  &lt;input type="text" id="email" name="email" /&gt;
  &lt;input type="text" id="subject" name="subject" /&gt;
  &lt;input type="text" id="url" name="url" /&gt;
  &lt;input type="checkbox" id="showdetails" name="showdetails" /&gt; Show URL Details
  &lt;input type="submit" value="Submit" /&gt;
  &lt;/form&gt;`
  </code></pre>
  
  <p>I need the value of the URL input field to pass to a php string (as soon as the user checks the showdetails checkbok) so that I can process it in background to show information based on the url.</p>