I need to program a ESP32 to act as webserver and have 2 simple pages.
The first one should contain a form that the user has to fill in. (one text box, one dropdown and one checkbox.) The form has a submit button, and when it is pressed, the values are written to the ESP32, and a new page is presented. This new page will the update its content dynamically via AJAX calls.
I've found and seen countless tutorials and managed to make the second AJAX page that updates on its own without refreshing. I am not able to undertand tough how I can make the / root page with the form to submit its data, AND to forward to the second page.
So basically the questions are 3:
- how can i have more than one page on a ESP32?
- how can I submit a form so that the values get stored in variables on the ESP?
- how can the submit button forward to the next page?
Thank you
-----EDIT:------
I found an answer to questions 1 and 3 with this sample: https://www.arduinoslovakia.eu/blog/2019/4/esp8266---http-server-s-viac-strankami?lang=en
question 2 is still open tough. Thank you!