[SOVLED] AsyncWebServer doesn't receive values from HTTP_POST
Posted: Thu Feb 21, 2019 9:28 am
I've been trying to save some values from two input fields inside a HTML page.
Here is the main.cpp.
Here is the index.html.
As you can see I've been trying to save networkName and networkPassword in other const *char just to be able to Serial.print(); them but it doesn't work. They show a blank space in Serial Monitor.
Also, shouldn't request->redirect("/url"); redirect me to /url ? Because it doesn't.
I've pressed on the Sign In or Restart buttons and the Enter key on my keyboard and nothing happens.
Looking at the sketch I realize that I have no idea how to implement an action when pressing, for example, Sign In button.
How do I link those two buttons to actions in my sketch ? I haven't been able to found anything that resembles my project.
Does anybody have any idea ? Because I really don't.
Thank you !
UPDATE 1:
Here is the main.cpp.
Here is the index.html.
As you can see I've been trying to save networkName and networkPassword in other const *char just to be able to Serial.print(); them but it doesn't work. They show a blank space in Serial Monitor.
Also, shouldn't request->redirect("/url"); redirect me to /url ? Because it doesn't.
I've pressed on the Sign In or Restart buttons and the Enter key on my keyboard and nothing happens.
Looking at the sketch I realize that I have no idea how to implement an action when pressing, for example, Sign In button.
How do I link those two buttons to actions in my sketch ? I haven't been able to found anything that resembles my project.
Does anybody have any idea ? Because I really don't.
Thank you !
UPDATE 1:
GeorgeFlorian1 wrote: ↑Thu Feb 21, 2019 2:30 pm
Sorry, I forgot to update the gist. I actually made the Sign In button into a type="submit".
After entering some values in the input fields and pressing on the Sign In button it reloads the page and gives me this error:The Serial Monitor resets too but the output is the same. The values that I'm trying to save do not save.Code: Select all
This site can’t be reached The connection was reset. Try: Checking the connection Checking the proxy and the firewall ERR_CONNECTION_RESET