Webserver won't redirect me
Posted: Thu Sep 14, 2023 6:13 pm
Hello, i am writing a Dashboard for my ESP8266 and i have a Button that adds a Argument to the URL, when the Webserver has this Argument the clearPass Function is run. My Problem is the Redirect doesn't work, the Rest of the Function does but not the Redirect.
- <form style='display:inline-block;' method='post' action='/dashboard?delpasswd'><button style='display:inline-block;'>Delete Passwords</button></form>
- if (webServer.hasArg("delpasswd")){clearPass();}
- void clearPass(){
- allPass = "";
- passEnd = passStart; // Setting the password end location -> starting position.
- EEPROM.write(passEnd, '\0');
- EEPROM.commit();
- webServer.sendHeader("Location", "/dashboard", true);
- webServer.send(302);}