title: form data not getting passed
body: <p>I'm practicing form validation with JavaScript but when I try to retrieve the data from the page it submits to I can't get it.</p>
  
  <p><strong>form.html</strong></p>
  
  <pre><code>&lt;body&gt;
      Hello.&lt;br /&gt;
      &lt;form onsubmit="return validate()" action="process.php" method="POST"&gt;
      Enter name: &lt;input type="text" id="name" /&gt;&lt;br /&gt;
      Enter phone number: &lt;input type="text" id="number" /&gt;&lt;br /&gt;
      Enter password: &lt;input type="password" id="paswd" /&gt;&lt;br /&gt;
      Is there anything else you would like to add: &lt;input type="text" id="anything" /&gt;&lt;br /&gt;
      &lt;input type="submit" value="Check Form" /&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p><strong>process.php</strong></p>
  
  <pre><code>&lt;?php
  echo 'Here: '.$_POST['number']
  ?&gt;
  </code></pre>
  
  <p>Whatever index I use I get " Undefined index: line 2". What am I doing wrong?</p>
  
  <p>EDIT: So I can't use the <code>id</code> attribute I need the <code>name</code>? Is there anyway to prevent coding redundancy since the value of all <code>name</code>s will be the same as the corresponding <code>id</code>?</p>