- Sat Aug 20, 2016 2:32 am
#53340
Hi @EdCasati,
I would use
ESP8266WebServer library. Try this example -
https://github.com/esp8266/Arduino/blob ... Server.inoLoad it to module, enter your request (for this particular one use Chrome, not IE) and you should see:
not-found.png
This page is generated by function
handleNotFound().
Using this function and function
server.on("/inline", [](){ as examples, you can write similar code to capture values of HR1 and MIN1, that initially may look like below:
Code: Select all server.on("/msg", []() {
String message = "<form action= 'msg'>Reminder 3 - Hour:<input type='text' name='HR2' size='2' maxlength='2'>Min:<input type='text' name='MIN2' size='2' maxlength='2'> <input type='submit' value='Set'> </form>";
message += "The form returned: ";
message += "URI: ";
message += server.uri();
message += "\nMethod: ";
message += (server.method() == HTTP_GET) ? "GET" : "POST";
message += "\nArguments: ";
message += server.args();
message += "\n";
for (uint8_t i = 0; i < server.args(); i++) {
message += " " + server.argName(i) + ": " + server.arg(i) + "\n";
}
server.send(200, "text/html", message);
});
If you add it to the example sketch you should see:
the-form.png
Now the form returns the data and still show specific screen in response.
I hope this will give you initial idea / guidance.
Krzysztof
You do not have the required permissions to view the files attached to this post.