Submission of HTML form actually invokes POST or GET method of HTTP protocol. This protocol is human readable.
Example of HTTP request from w3schools :
POST /test/demo_form.asp HTTP/1.1
Host: w3schools.com
name1=value1&name2=value2
This is what you'll get into arduino buffer. You can simply search for name1= pattern and read the value and act accordingly.
In the example below I read values of variables s and e.
word len = ether.packetReceive();
word pos = ether.packetLoop(len);
if (pos) {
bfill = ether.tcpOffset();
char* socket = strstr((char *)Ethernet::buffer + pos, "?s=");
if(socket != 0){
byte s = getIntArg(socket, "s");
byte e = getIntArg(socket, "e");
Serial.println("Request");
Serial.println(s);
Serial.println(e);
PlanActions(s, e)
}
Form for this request looks like:
<form action="." method="POST">
<select name="s" size="1">
<option value="0">TV</option>
<option value="1">HiFi</option>
</select>
<input name="e" type="submit" value="0">
<input name="e" type="submit" value="1">
</form>
In the example I'm sending simple form page from arduino, but you can have the page wherever you want. It can be on local computer or web server. Just change action to something like <form action="arduino-ip"