web_parmsI'm using the example from the Webduino library to access http GET parameters in a URL:
I can do this just fine:
http://192.168.2.10/parsed.html?foo=10
and the returned web page correctly says:
foo = '10'
The code in the example generating that is:
server.print(name);
server.printP(Parsed_item_separator);
server.print(value);
server.printP(Tail_end);
Fine and dandy. Now what I want to do is to react if the value of foo is greater than say 5. So under that block I've added :
if(String(name) == "foo"){
int fooval = (int)value;
server.print(fooval);
if(fooval > 0) {
server.print("<p>got foo</p>");
}
}
This is not giving me expected results. server.print(fooval) emits 2129, not 10. Am I casting correctly? Any idea what I'm doing wrong here?
Thanks.