NodeMCU html page data handling

Hi,

I have a NodeMCU which I am using in the access point mode. I use this mode to host a html page with a webserver code I have written. In the html page, I basically use a form to take in home Wi-Fi credentials to use it when in station mode. The values in those fields get passed on (I have attached a screenshot showing the same). But, when I use the following code to use those values, I am not able to use any of it.

if (server.args() > 0 ) {
    for ( uint8_t i = 0; i < server.args(); i++ ) {
      if (server.argName(i) == "fname") {
         // do something here with value from server.arg(i);
      }
   }
}

server.args() gives a value of 0 and the program doesn’t enter this loop at all. What am I doing wrong and how can I correct that? Any help is much appreciated.

Thanks!

PaulRB:

Yeah, Paul?

You posted an image as an attachment. I put it in a post so everyone can see it (many forum members use phones & tablets to browse the forum much of the time, so can't open attachments). Now everyone can see the image and hopefully one of them will understand what its supposed to show.

Please read point 11 on this page.

PaulRB:
You posted an image as an attachment. I put it in a post so everyone can see it (many forum members use phones & tablets to browse the forum much of the time, so can't open attachments). Now everyone can see the image and hopefully one of them will understand what its supposed to show.

Please read point 11 on this page.

Thank you! I will do so from now on.