Chat freely about anything...

User avatar
By Bonzo
#91934 Try searching the web for: esp8266 send data website
There are quite a few examples to follow. One tip is try and use a http web page not a https page as that creates problems.
User avatar
By zepjau
#91942 Thank you.
I need insert data values into this html page:
const char index_html[] PROGMEM = R"rawliteral(
<meta name="viewport" content="width=device-width, initial-scale=1">
html {font-family: Arial; display: inline-block; text-align: center;}
h2 {font-size: 3.0rem;}
p {font-size: 3.0rem;}
body {max-width: 600px; margin:0px auto; padding-bottom: 25px;}
.switch {position: relative; display: inline-block; width: 120px; height: 68px}
.switch input {display: none}
.slider {position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; border-radius: 34px}
.slider:before {position: absolute; content: ""; height: 52px; width: 52px; left: 8px; bottom: 8px; background-color: #fff; -webkit-transition: .4s; transition: .4s; border-radius: 68px}
input:checked+.slider {background-color: #2196F3}
input:checked+.slider:before {-webkit-transform: translateX(52px); -ms-transform: translateX(52px); transform: translateX(52px)}
<h3>Control 4 zonas</h3>
<script>function toggleCheckbox(element) {
var xhr = new XMLHttpRequest();
if(element.checked){"GET", "/update?relay=""&state=1", true); }
else {"GET", "/update?relay=""&state=0", true); }
<form method="post" action="/save" >
Encendido:<sp><input name="onTime" type="text" size="10" value="5" ><br><br>
Apagado :<sp><input name="offTime" type="text" size="10" value="8" ><br>
<input type="submit" name="clk_action" value="accept">

How do it?.