title: html POST request login to website
body: <p>Hi im trying to figure out how to login to a website using a post request.
  I want to do this because i want to make a web app using particular data from content shown on the website after login.</p>
  
  <p>However i cannot seem to figure out which url i need to use to login.</p>
  
  <p>This is the FORM : </p>
  
  <pre><code>&lt;FORM onSubmit="return checkrequired(this)" METHOD=POST ACTION="/pkmslogin.form"&gt;
  &lt;FONT SIZE="+2"&gt;
  &lt;TABLE BORDER="0" WIDTH="400"&gt;
  &lt;TR&gt;
  &lt;TD ALIGN="LEFT"&gt;&lt;UL&gt;&lt;LI&gt;Gebruikersnaam&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;
  &lt;TD&gt;&lt;INPUT TYPE="TEXT" NAME="username" SIZE="15" AUTOCOMPLETE="off"&gt;
  &lt;/TD&gt;
  &lt;/TR&gt;
  &lt;TR&gt;
  &lt;TD ALIGN="LEFT"&gt;&lt;UL&gt;&lt;LI&gt;Wachtwoord&lt;/LI&gt;&lt;/UL&gt;&lt;/TD&gt;
  &lt;TD&gt;&lt;INPUT TYPE="PASSWORD" NAME="password" SIZE="15" AUTOCOMPLETE="off"&gt;&lt;/TD&gt;
  &lt;INPUT TYPE="HIDDEN" NAME="login-form-type" VALUE="pwd"&gt;
  &lt;/TR&gt;
  &lt;/TABLE&gt;
  &lt;/FONT&gt;
  &lt;BR&gt;&amp;nbsp &lt;INPUT TYPE="SUBMIT" VALUE="Aanmelden"&gt;
  </code></pre>
  
  <p>The javascript checkrequired():</p>
  
  <pre><code>function checkrequired(which) {
  
  var pass=true;
  if (document.images) {
     for (i=0;i&lt;which.length;i++) {
        var tempobj=which.elements[i];
        if (((tempobj.type=="text"||tempobj.type=="password")&amp;&amp;tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&amp;&amp;tempobj.selectedIndex==0)) {
           pass=false;
           break;
        }
     }
  }
  if (!pass) {
     shortFieldName=tempobj.name.substring(0,30).toUpperCase();
     if (shortFieldName=="USERNAME") {
        shortFieldName="Gebruikersnaam";
     }
     if (shortFieldName=="PASSWORD") {
        shortFieldName="Wachtwoord";
     }
     alert("Het veld \""+shortFieldName+"\" is niet ingevuld.");
     return false;
  }
  else
     return true;
  }
  </code></pre>
  
  <p>I thought i needed to use /?Username='...'&amp;password='...' but this is not the case.</p>
  
  <p><strong>edit</strong></p>
  
  <hr>
  
  <p>Chrome developer tools tells me no variables are being passed to the pkmslogin.form</p>
  
  <ul>
  <li><strong>Path   =</strong> pkmslogin.form    </li>
  <li><strong>method =</strong> POST    </li>
  <li><strong>Status =</strong> 302    Moved Temporarily    </li>
  <li><strong>type =</strong> text/html </li>
  <li><strong>Initiator =</strong> Other    </li>
  <li><strong>Size =</strong> 713 B    0 B    </li>
  <li><strong>Time =</strong> 367 ms    366 ms</li>
  </ul>