Webserver username and password validation

Dear all,

I am trying to get data from webserver and want to check user name and password is valid or not. Here i have put method of taking username and password from webserver. Now Question is how to compare result

#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 
  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1,128);

// Initialize the Ethernet server library
// with the IP address and port you want to use 
// (port 80 is default for HTTP):
EthernetServer server(80);

void setup() {
 // Open serial communications and wait for port to open:
  Serial.begin(9600);
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }


  // start the Ethernet connection and the server:
  Ethernet.begin(mac, ip);
  server.begin();
  Serial.print("server is at ");
  Serial.println(Ethernet.localIP());
}


void loop() {
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        Serial.write(c);
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
client.println("<!DOCTYPE html>");
          client.println("<html>");
           client.println("<body>");
            client.println("<form action=='demo_form.asp'> Birthday: <input type='date' name='bday'> <input type='submit'>");
         
        client.println("<form>");
        client.println("</form>");
        client.println("USER name:<input type='text' name='firstname'>
");
         client.println("PASSWORD:<input type='password' name='pwd'>
");

         
         
         
         
         
         
         
         
         
         
         client.println("</form>");
         client.println("<body>");
          client.println("</html>");
          
          
          
          
          
          
          
          
          
          
          
          
          break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        } 
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
    Serial.println("client disonnected");
  }
}

Now Question is how to compare result

What result? Once again, you don't give a shit what the client wants. Until you start to care, you are wasting your time, and ours.

Here i get data from The Username and password. How to get data and compare with username and password stored

Here i get data from The Username and password.

Where? How? What are you doing with the data?

Example Arduino :

Login page user enter username and passsword When press enter on submit . Server Check validity of password and username
If available emter into website , else gives out error saying invalid username and password
Code i pasted it takes input from user and once submit button how to make check condition username is valid or invalid

how to make check condition username is valid or invalid

Answer the questions that are asked.
PROVE you know what code is responsible for getting the client data. PROVE you are actually learning something, rather than copying and pasting someone else's work.

Describe what you are doing with the client data.

Describe how you expect to use that data for anything, after you've thrown it away.