title: Send Data from HTML to Python
body: <p>I have an HTML page, and I want to use the Data in the Username field in a code in python. What methods should I use. I am not using any python framework.</p>
  
  <pre><code>    &lt;body&gt;
      &lt;div id="Header" &gt;
          &lt;/div&gt;
     &lt;div id="wrapper"&gt;
  
          &lt;form name="login-form" class="login-form" action="" method="post"  onsubmit=    "validate();return false;"&gt;
  
          &lt;div class="header"&gt;
          &lt;h1&gt;Login Form&lt;/h1&gt;
  
          &lt;/div&gt;
  
          &lt;div class="content"&gt;
          &lt;input id="Uname" name="username" type="text" class="input username" placeholder="Username" /&gt;
          &lt;div class="user-icon"&gt;&lt;/div&gt;
          &lt;input id="Pname"name="password" type="password" class="input password" placeholder="Password" /&gt;
          &lt;div class="pass-icon"&gt;&lt;/div&gt;       
          &lt;/div&gt;
  
          &lt;div class="footer"&gt;
          &lt;input type="submit" name="submit" value="Login" class="button"/&gt;
          &lt;input type="submit" name="submit" value="Register" class="register" /&gt;
          &lt;/div&gt;
  
      &lt;/form&gt;
         &lt;/div&gt;
  
  &lt;div class="gradient"&gt;&lt;/div&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Validate() is a javascript function used to validate the credentials.</p>