Post topics, source code that relate to the Arduino Platform

User avatar
By paulfer
#52436
martinayotte wrote:For submitting the form values, you need a separate URL for the POST (adjust your form action as followed) :

Code: Select all<form action='http://192.168.4.1/submit' method='POST'>

And add a new handler for it :

Code: Select allserver.on("/submit", handleSubmit);

Then, in your handlerSubmit, you will get values by parsing arguments :

Code: Select allif (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);
      }
   }
}


This is definitely the answer!!

As an aside, martin, where is any semblance of documentation on this server library?

Regds!!! Paul