Webserver won't redirect me

HEINZGUENTER
Posts: 2
Joined: Thu Sep 14, 2023 5:31 pm

Webserver won't redirect me

Postby HEINZGUENTER » 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,
  1. <form style='display:inline-block;' method='post' action='/dashboard?delpasswd'><button style='display:inline-block;'>Delete Passwords</button></form>
when the Webserver has this Argument the clearPass Function is run.
  1. if (webServer.hasArg("delpasswd")){clearPass();}
  1. void clearPass(){
  2.   allPass = "";
  3.   passEnd = passStart; // Setting the password end location -> starting position.
  4.   EEPROM.write(passEnd, '\0');
  5.   EEPROM.commit();
  6.   webServer.sendHeader("Location", "/dashboard", true);
  7.   webServer.send(302);}
My Problem is the Redirect doesn't work, the Rest of the Function does but not the Redirect.

Who is online

Users browsing this forum: No registered users and 10 guests