title: Return name after clicking button - HTML, PHP, JavaScript
body: <p>I have a HTML file with a text input field and a button. When you type a name and click the button, it should return the name you typed within the div. </p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;
      function get() {
          $.post('data.php', { name: form.name.value},
              function(output) {
              $('#age').html(output).show();
          });
      }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;p&gt;
          &lt;form name="form"&gt;
              &lt;input type ="text" name="name"&gt;
              &lt;input type="button" value="get" onClick="get();"&gt;
          &lt;/form&gt;
      &lt;/p&gt;
  
      &lt;div id="age"&gt;&lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I also have a PHP file, data.php:</p>
  
  <pre><code>&lt;?php
      $name = $_POST('name');
      echo $name;
  ?&gt;
  </code></pre>
  
  <p>It should return the name I typed in the div, but it doesn't work. Anyone tips?</p>