title: Keep submit button disabled until form is complete and confirming password
body: <p>I know that there are a bunch of posts about this already, but no matter what I try, nothing works for my form. </p>
  
  <p>I simply want the submit button to be disabled until all fields are filled in, and I want <code>$mypassword</code> checked to equal <code>$myconfirmpassword</code> before submitting. </p>
  
  <p>If you can find something that works. THANK YOU SO MUCH!!</p>
  
  <p>Obviously, some things are hidden for privacy purposes, as you can't see my CSS and PHP info.</p>
  
  <pre><code>&lt;div id="container" style="height:700px;"&gt;
  &lt;a href="login.php" class="anchor"&gt;&lt;div id="back"&gt;
   &lt;h2&gt;Back&lt;/h2&gt;             
   &lt;/div&gt;&lt;/a&gt;
      &lt;div id="registration_container" &gt;
     &lt;table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#FF9"&gt;
      &lt;tr&gt;
  &lt;form name="form3" method="post" action="check_finish_registration.php"&gt;
          &lt;td&gt;
          &lt;table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FF9"&gt;
              &lt;tr&gt;
                  &lt;td colspan="3"&gt;&lt;strong&gt;Complete Registration &lt;/strong&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td width="2000"&gt;First Name&lt;/td&gt;
                  &lt;td width="6"&gt;:&lt;/td&gt;
                  &lt;td width="294"&gt;&lt;?php echo $fname ?&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td width="2000"&gt;Middle Name*&lt;/td&gt;
                  &lt;td width="6"&gt;:&lt;/td&gt;
                  &lt;td width="294"&gt;&lt;input type="text" name="mymname" id="mymname"&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
                  &lt;td width="2000"&gt;Last Name&lt;/td&gt;
                  &lt;td width="6"&gt;:&lt;/td&gt;
                  &lt;td width="294"&gt;&lt;?php echo $lname ?&gt;&lt;/td&gt;
              &lt;/tr&gt;
               &lt;tr&gt;
                  &lt;td width="2000"&gt;Create a Username*&lt;/td&gt;
                  &lt;td width="6"&gt;:&lt;/td&gt;
                  &lt;td width="294"&gt;&lt;input type="text" name="myusername" id="myusername"&gt;&lt;/td&gt;
              &lt;/tr&gt;
               &lt;tr&gt;
                  &lt;td width="2000"&gt;Create a Password*&lt;/td&gt;
                  &lt;td width="6"&gt;:&lt;/td&gt;
                  &lt;td width="294"&gt;&lt;input type="text" name="mypassword" id="mypassword"&gt;&lt;/td&gt;
              &lt;/tr&gt;
               &lt;tr&gt;
                  &lt;td width="2000"&gt;Confirm Your Password*&lt;/td&gt;
                  &lt;td width="6"&gt;:&lt;/td&gt;
                  &lt;td width="294"&gt;&lt;input type="text" name="myconfirmpassword" id="myconfirmpassword"&gt;&lt;/td&gt;
              &lt;/tr&gt;
               &lt;tr&gt;
                  &lt;td width="2000"&gt;Enter your Sigma Number*&lt;/td&gt;
                  &lt;td width="6"&gt;:&lt;/td&gt;
                  &lt;td width="294"&gt;&lt;input type="text" name="mysnumber" id="mysnumber"&gt;&lt;/td&gt;
              &lt;/tr&gt;
               &lt;tr&gt;
                  &lt;td width="2000"&gt;E-Mail Address*&lt;/td&gt;
                  &lt;td width="6"&gt;:&lt;/td&gt;
                  &lt;td width="294"&gt;&lt;input type="text" name="myemail" id="myemail"&gt;&lt;/td&gt;
              &lt;/tr&gt;
              &lt;tr&gt;
  
  
                  &lt;td width="2000"&gt;* required field&lt;/td&gt;
                  &lt;td&gt;&amp;nbsp;&lt;/td&gt;
                  &lt;td&gt;&lt;input   type="submit" id='register' value="Register"disabled='disabled'&gt;&lt;/td&gt;
              &lt;/tr&gt;
          &lt;/table&gt;
          &lt;/td&gt;
  &lt;/form&gt;
  
       &lt;/tr&gt;
      &lt;/table&gt;
      &lt;/div&gt;    
  &lt;/div&gt;
  </code></pre>