title: Handling Username / Password between HTML and C
body: <p>I'm having a lot of trouble trying to handle username / passwords from my HTML page. I've set up a basic page which uses:</p>
  
  <pre><code>&lt;form action="myCFile.cgi" method="post"&gt;
  Username: &lt;input type="text" name="username"&gt;&lt;br&gt;
  Password: &lt;input type="password" name="password"&gt;&lt;br&gt;
  &lt;input type="submit" value="Create Account" /&gt;
  </code></pre>
  
  <p>This information is sent to myCFile.cgi which of course in my actual code is an exact http address. I've confirmed that the information is successfully passed to the C file. Within this file I want to be able to check if that username already exists in an .ssv file that I have created (which is in the format: username password), and if it does not, I wish to append the document with the username and password information.
  My trouble comes in trying to identify exactly what information being passed is the username. When "post" is used I know it sends information in the form:</p>
  
  <pre><code>username=xyz&amp;password=abc
  </code></pre>
  
  <p>What is the best way to extract the username "xyz" from the above given that I won't know the length of the username? I want to stick only to C.
  Thanks for your help</p>