Esp8266, the website and arduino reading the results

I am building a 3 dof servo robot that is going to be controlled via wifi with an esp8266 (still in the post) I have a camera feed in the web page code and controls for the servos. The code below shows where I am at but my main question is how the arduino code knows what has been pressed in the website. I know it has something to do with the parameter 200 taking the spiff data. I am working on ajax code for sliders but will just get the ahref links working first for 30 degree increments.

//nCr Robotics Luke Jamie control servos and video feed over wifi
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
Servo servo1
Servo servo2
const char webui[] PROGMEM = R"=====(

nCr Robotics #container { margin: 0px auto; width: 500px; height: 375px; border: 10px #333 solid; } #videoElement { width: 500px; height: 375px; background-color: #666; }

Servo Control

Click to turn Servo1 30 degrees
Click to turn Servo1 60 degress
Click to turn Servo1 90 degrees
Click to turn Servo1 120 degress
Click to turn Servo1 150 degrees

Click to turn Servo1 180 degress
Click to turn Servo2 30 degrees
Click to turn Servo2 60 degress
Click to turn Servo2 90 degrees
Click to turn Servo2 120 degress

Click to turn Servo2 150 degress
Click to turn Servo2 180 degrees
Click to turn Servo3 30 degress
Click to turn Servo3 60 degress
Click to turn Servo3 90 degrees

Click to turn Servo3 120 degress
Click to turn Servo3 150 degrees
Click to turn Servo3 180 degress

Servo 1 inbetween 1-180

Servo 2 inbetween 1-180

Servo 3 inbetween 1-180

Servo State

)====="; //---------------------------------------------------------------

const char* ssid = "xxx";
const char* password = "123";

ESP8266WebServer server(80); //Server on port 80

void handleRoot() {
String s = webui;
server.send(200, "text/html", s);}

void servo1_30degrees(){
servo1.write(30);
server.send(200, "text/html", "30 degrees");}
void servo1_60degrees() {
servo1.write(60);
server.send(200, "text/html", "60 degrees");}
void servo1_90degrees(){
servo1.write(90);
server.send(200, "text/html", "90 degrees");}
void servo1_120degrees(){
servo1.write(120);
server.send(200, "text/html", "120 degrees");}
void servo1_150degrees() {
servo1.write(150);
server.send(200, "text/html", "150 degrees");}
void servo1_180degrees(){
servo1.write(180);
server.send(200, "text/html", "180 degrees");}

void servo2_30degrees(){
servo2.write(30);
server.send(200, "text/html", "30 degrees");}
void servo2_60degrees() {
servo2.write(60);
server.send(200, "text/html", "60 degrees");}
void servo2_90degrees(){
servo2.write(90);
server.send(200, "text/html", "90 degrees");}
void servo2_120degrees(){
servo2.write(120);
server.send(200, "text/html", "120 degrees");}
void servo2_150degrees() {
servo2.write(150);
server.send(200, "text/html", "150 degrees");}
void servo2_180degrees(){
servo2.write(180);
server.send(200, "text/html", "180 degrees");}

void servo1_30degrees(){
servo3.write(30);
server.send(200, "text/html", "30 degrees");}
void servo1_60degrees() {
servo3.write(60);
server.send(200, "text/html", "60 degrees");}
void servo1_90degrees(){
servo3.write(90);
server.send(200, "text/html", "90 degrees");}
void servo1_120degrees(){
servo3.write(120);
server.send(200, "text/html", "120 degrees");}
void servo1_150degrees() {
servo3.write(150);
server.send(200, "text/html", "150 degrees");}
void servo1_180degrees(){
servo3.write(180);
server.send(200, "text/html", "180 degrees");}
void setup(void){
void forminput1(){

}
servo.attach(9);
Serial.begin(115200);

WiFi.begin(ssid, password); //Connect to your WiFi router
Serial.println("");

while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());
server.begin();
Serial.println("HTTP server started");
}
void loop(void){
server.handleClient();
}

nCrrobotics:
but my main question is how the arduino code knows what has been pressed in the website.

It seems that your question is about an Arduino getting commands from a website rather than about servos. IMHO it would be a good idea to modify your Original Post and change the title so that people who know about websites will read it.

Also, when posting code please use the code button </>
codeButton.png

so your code 
looks like this

and is easy to copy to a text editor See General Guidance and How to use the forum

...R

I am building a 3 dof servo robot that is going to be controlled via wifi with an esp8266 (still in the post) I have a camera feed in the web page code and controls for the servos. The code below shows where I am at but my main question is how the arduino code knows what has been pressed in the website. I know it has something to do with the parameter 200 taking the spiff data. I am working on ajax code for sliders but will just get the ahref links working first for 30 degree increments.

//nCr Robotics Luke Jamie control servos and video feed over wifi
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
Servo servo1
Servo servo2
const char webui[] PROGMEM = R"=====(
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">

<title>nCr Robotics</title>
<body>
<center>
<style>
#container {
  margin: 0px auto;
  width: 500px;
  height: 375px;
  border: 10px #333 solid;
}
#videoElement {
  width: 500px;
  height: 375px;
  background-color: #666;
}
</style>
</head>
 
<body>
<div id="container">
  <video autoplay="true" id="videoElement">
  
  </video>
</div>
<script>
var video = document.querySelector("#videoElement");

if (navigator.mediaDevices.getUserMedia) {
  navigator.mediaDevices.getUserMedia({ video: true })
    .then(function (stream) {
      video.srcObject = stream;
    })
    .catch(function (err0r) {
      console.log("Something went wrong!");
    });
}
</script>


<h1>Servo Control</h1>

Click to turn <a href="servo1 30 degrees" target="myIframe">Servo1 30 degrees</a>
Click to turn <a href="servo1 60 degrees" target="myIframe">Servo1 60 degress</a>
Click to turn <a href="servo1 90 degrees" target="myIframe">Servo1 90 degrees</a>
Click to turn <a href="servo1 120 degrees" target="myIframe">Servo1 120 degress</a>
Click to turn <a href="servo1 150 degrees" target="myIframe">Servo1 150 degrees</a>

Click to turn <a href="servo1 180 degrees" target="myIframe">Servo1 180 degress</a>
Click to turn <a href="servo2 30 degrees" target="myIframe">Servo2 30 degrees</a>
Click to turn <a href="servo2 60 degrees" target="myIframe">Servo2 60 degress</a>
Click to turn <a href="servo2 90 degrees" target="myIframe">Servo2 90 degrees</a>
Click to turn <a href="servo2 120 degrees" target="myIframe">Servo2 120 degress</a>

Click to turn <a href="servo2 150 degrees" target="myIframe">Servo2 150 degress</a>
Click to turn <a href="servo2 180 degrees" target="myIframe">Servo2 180 degrees</a>
Click to turn <a href="servo3 30 degrees" target="myIframe">Servo3 30 degress</a>
Click to turn <a href="servo3 60 degrees" target="myIframe">Servo3 60 degress</a>
Click to turn <a href="servo3 90 degrees" target="myIframe">Servo3 90 degrees</a>

Click to turn <a href="servo3 120 degrees" target="myIframe">Servo3 120 degress</a>
Click to turn <a href="servo1 30 degrees" target="myIframe">Servo3 150 degrees</a>
Click to turn <a href="servo1 60 degrees" target="myIframe">Servo3 180 degress</a>
<form>
<p>
<p>
<label for="servo1input">Servo 1 inbetween 1-180 </label><input type="text" id="servo1input" name="servo1input">


<label for="servo2input">Servo 2 inbetween 1-180 </label><input type="text" id="servo2input" name="servo2input">

 
<label for="servo3nput">Servo 3 inbetween 1-180 </label><input type="text" id="servo3input" name="servo3input">

 
<input type="submit" value="Submit">

Servo State<iframe name="myIframe" width="100" height="25" frameBorder="0">




</body>
</html>
)=====";
//---------------------------------------------------------------


const char* ssid = "xxx";
const char* password = "123";

ESP8266WebServer server(80); //Server on port 80

void handleRoot() {
String s = webui;
server.send(200, "text/html", s);}

void servo1_30degrees(){
servo1.write(30); 
server.send(200, "text/html", "30 degrees");}
void servo1_60degrees() { 
servo1.write(60); 
server.send(200, "text/html", "60 degrees");}
void servo1_90degrees(){
servo1.write(90); 
server.send(200, "text/html", "90 degrees");}
void servo1_120degrees(){
servo1.write(120); 
server.send(200, "text/html", "120 degrees");}
void servo1_150degrees() { 
servo1.write(150); 
server.send(200, "text/html", "150 degrees");}
void servo1_180degrees(){
servo1.write(180); 
server.send(200, "text/html", "180 degrees");}

void servo2_30degrees(){
servo2.write(30); 
server.send(200, "text/html", "30 degrees");}
void servo2_60degrees() { 
servo2.write(60); 
server.send(200, "text/html", "60 degrees");}
void servo2_90degrees(){
servo2.write(90); 
server.send(200, "text/html", "90 degrees");}
void servo2_120degrees(){
servo2.write(120); 
server.send(200, "text/html", "120 degrees");}
void servo2_150degrees() { 
servo2.write(150); 
server.send(200, "text/html", "150 degrees");}
void servo2_180degrees(){
servo2.write(180); 
server.send(200, "text/html", "180 degrees");}

void servo1_30degrees(){
servo3.write(30); 
server.send(200, "text/html", "30 degrees");}
void servo1_60degrees() { 
servo3.write(60); 
server.send(200, "text/html", "60 degrees");}
void servo1_90degrees(){
servo3.write(90); 
server.send(200, "text/html", "90 degrees");}
void servo1_120degrees(){
servo3.write(120); 
server.send(200, "text/html", "120 degrees");}
void servo1_150degrees() { 
servo3.write(150); 
server.send(200, "text/html", "150 degrees");}
void servo1_180degrees(){
servo3.write(180); 
server.send(200, "text/html", "180 degrees");}
void setup(void){
void forminput1(){

 
}
servo.attach(9);
Serial.begin(115200);
  
WiFi.begin(ssid, password);     //Connect to your WiFi router
Serial.println("");
  
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP());  //IP address assigned to your ESP
server.begin();                  //Start server
Serial.println("HTTP server started");
}
void loop(void){
  server.handleClient();          //Handle client requests
}

I am building a 3 dof servo robot that is going to be controlled via wifi with an esp8266 (still in the post) I have a camera feed in the web page code and controls for the servos. The code below shows where I am at but my main question is how the arduino code knows what has been pressed in the website. I know it has something to do with the parameter 200 taking the spiff data. I am working on ajax code for sliders but will just get the ahref links working first for 30 degree increments.

//nCr Robotics Luke Jamie control servos and video feed over wifi
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
Servo servo1
Servo servo2
const char webui[] PROGMEM = R"=====(
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">

<title>nCr Robotics</title>
<body>
<center>
<style>
#container {
  margin: 0px auto;
  width: 500px;
  height: 375px;
  border: 10px #333 solid;
}
#videoElement {
  width: 500px;
  height: 375px;
  background-color: #666;
}
</style>
</head>
 
<body>
<div id="container">
  <video autoplay="true" id="videoElement">
 
  </video>
</div>
<script>
var video = document.querySelector("#videoElement");

if (navigator.mediaDevices.getUserMedia) {
  navigator.mediaDevices.getUserMedia({ video: true })
    .then(function (stream) {
      video.srcObject = stream;
    })
    .catch(function (err0r) {
      console.log("Something went wrong!");
    });
}
</script>


<h1>Servo Control</h1>

Click to turn <a href="servo1 30 degrees" target="myIframe">Servo1 30 degrees</a>
Click to turn <a href="servo1 60 degrees" target="myIframe">Servo1 60 degress</a>
Click to turn <a href="servo1 90 degrees" target="myIframe">Servo1 90 degrees</a>
Click to turn <a href="servo1 120 degrees" target="myIframe">Servo1 120 degress</a>
Click to turn <a href="servo1 150 degrees" target="myIframe">Servo1 150 degrees</a>

Click to turn <a href="servo1 180 degrees" target="myIframe">Servo1 180 degress</a>
Click to turn <a href="servo2 30 degrees" target="myIframe">Servo2 30 degrees</a>
Click to turn <a href="servo2 60 degrees" target="myIframe">Servo2 60 degress</a>
Click to turn <a href="servo2 90 degrees" target="myIframe">Servo2 90 degrees</a>
Click to turn <a href="servo2 120 degrees" target="myIframe">Servo2 120 degress</a>

Click to turn <a href="servo2 150 degrees" target="myIframe">Servo2 150 degress</a>
Click to turn <a href="servo2 180 degrees" target="myIframe">Servo2 180 degrees</a>
Click to turn <a href="servo3 30 degrees" target="myIframe">Servo3 30 degress</a>
Click to turn <a href="servo3 60 degrees" target="myIframe">Servo3 60 degress</a>
Click to turn <a href="servo3 90 degrees" target="myIframe">Servo3 90 degrees</a>

Click to turn <a href="servo3 120 degrees" target="myIframe">Servo3 120 degress</a>
Click to turn <a href="servo1 30 degrees" target="myIframe">Servo3 150 degrees</a>
Click to turn <a href="servo1 60 degrees" target="myIframe">Servo3 180 degress</a>
<form>
<p>
<p>
<label for="servo1input">Servo 1 inbetween 1-180 </label><input type="text" id="servo1input" name="servo1input">


<label for="servo2input">Servo 2 inbetween 1-180 </label><input type="text" id="servo2input" name="servo2input">


<label for="servo3nput">Servo 3 inbetween 1-180 </label><input type="text" id="servo3input" name="servo3input">


<input type="submit" value="Submit">

Servo State<iframe name="myIframe" width="100" height="25" frameBorder="0">




</body>
</html>
)=====";
//---------------------------------------------------------------


const char* ssid = "xxx";
const char* password = "123";

ESP8266WebServer server(80); //Server on port 80

void handleRoot() {
String s = webui;
server.send(200, "text/html", s);}

void servo1_30degrees(){
servo1.write(30);
server.send(200, "text/html", "30 degrees");}
void servo1_60degrees() {
servo1.write(60);
server.send(200, "text/html", "60 degrees");}
void servo1_90degrees(){
servo1.write(90);
server.send(200, "text/html", "90 degrees");}
void servo1_120degrees(){
servo1.write(120);
server.send(200, "text/html", "120 degrees");}
void servo1_150degrees() {
servo1.write(150);
server.send(200, "text/html", "150 degrees");}
void servo1_180degrees(){
servo1.write(180);
server.send(200, "text/html", "180 degrees");}

void servo2_30degrees(){
servo2.write(30);
server.send(200, "text/html", "30 degrees");}
void servo2_60degrees() {
servo2.write(60);
server.send(200, "text/html", "60 degrees");}
void servo2_90degrees(){
servo2.write(90);
server.send(200, "text/html", "90 degrees");}
void servo2_120degrees(){
servo2.write(120);
server.send(200, "text/html", "120 degrees");}
void servo2_150degrees() {
servo2.write(150);
server.send(200, "text/html", "150 degrees");}
void servo2_180degrees(){
servo2.write(180);
server.send(200, "text/html", "180 degrees");}

void servo1_30degrees(){
servo3.write(30);
server.send(200, "text/html", "30 degrees");}
void servo1_60degrees() {
servo3.write(60);
server.send(200, "text/html", "60 degrees");}
void servo1_90degrees(){
servo3.write(90);
server.send(200, "text/html", "90 degrees");}
void servo1_120degrees(){
servo3.write(120);
server.send(200, "text/html", "120 degrees");}
void servo1_150degrees() {
servo3.write(150);
server.send(200, "text/html", "150 degrees");}
void servo1_180degrees(){
servo3.write(180);
server.send(200, "text/html", "180 degrees");}
void setup(void){
void forminput1(){

 
}
servo.attach(9);
Serial.begin(115200);
 
WiFi.begin(ssid, password);     //Connect to your WiFi router
Serial.println("");
 
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.print("Connected to ");
Serial.println(ssid);
Serial.print("IP address: ");
Serial.println(WiFi.localIP()); 
server.begin();                 
Serial.println("HTTP server started");
}
void loop(void){
  server.handleClient();         
}

Duplicate topics merged

Do not post the same question in several forum sections. It wastes time and means that replies are not seen in context.

Yet another duplicate topic merged

This program is an amended version of one of the examples
It displays a button on a web page from which you can control the LED on the ESP8266

//adapted from https://tttapa.github.io/ESP8266/Chap10%20-%20Simple%20Web%20Server.html

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266mDNS.h>
#include <ESP8266WebServer.h>
ESP8266WebServer server(80);    // Create a webserver object that listens for HTTP request on port 80

const int led = BUILTIN_LED;
boolean ledFlashing = false;
unsigned long currentTime;
unsigned long flashStartTime;
unsigned long flashPeriod = 500;

void handleRoot();              // function prototypes for HTTP handlers
void handleLED();
void handleNotFound();

void setup(void)
{
  Serial.begin(115200);         // Start the Serial communication to send messages to the computer
  while (!Serial);
  delay(1000);
  Serial.println('\n');
  pinMode(led, OUTPUT);
  WiFi.mode(WIFI_STA);
  Serial.println("Connecting ...");
  WiFi.begin("XXXXXXX", "XXXXXXX");
  while (WiFi.status() != WL_CONNECTED)
  {
    delay(500);
    Serial.print(".");
  }
  Serial.println('\n');
  Serial.print("Connected to ");
  Serial.println(WiFi.SSID());              // Tell us what network we're connected to
  Serial.print("IP address:\t");
  Serial.println(WiFi.localIP());           // Send the IP address of the ESP8266 to the computer
  if (MDNS.begin("esp8266"))                // Start the mDNS responder for esp8266.local
  {
    Serial.println("mDNS responder started");
  }
  else
  {
    Serial.println("Error setting up MDNS responder!");
  }
  server.on("/", HTTP_GET, handleRoot);     // Call the 'handleRoot' function when a client requests URI "/"
  server.on("/LED", HTTP_POST, handleLED);  // Call the 'handleLED' function when a POST request is made to URI "/LED"
  server.onNotFound(handleNotFound);        // When a client requests an unknown URI (i.e. something other than "/"), call function "handleNotFound"
  server.begin();                           // Actually start the server
  Serial.println("HTTP server started");
}

void loop(void)
{
  currentTime = millis();
  server.handleClient();                    // Listen for HTTP requests from clients
  if (ledFlashing)
  {
    if (currentTime - flashStartTime >= flashPeriod)
    {
      digitalWrite(led, !digitalRead(led));     // Change the state of the LED
      flashStartTime = currentTime;
    }
  }
  else
  {
    digitalWrite(led, HIGH);
  }
}

void handleRoot()                           // When URI / is requested, send a web page with a button to toggle the LED
{
  char buffer[600];
  char actionText[10];
  if (ledFlashing)
  {
    strcpy(actionText, "stop");
  }
  else
  {
    strcpy(actionText, "start");
  }
  sprintf(buffer, "<form action=\"/LED\" method=\"POST\"> <input type=\"submit\" value=\"Click button to %s LED flashing\"> </form>", actionText);
  server.send(200, "text/html", buffer );
}

void handleLED()                            // If a POST request is made to URI /LED
{
  ledFlashing = !ledFlashing;
  server.sendHeader("Location", "/");       // Add a header to respond with a new location for the browser to go to the home page again
  server.send(303);                         // Send it back to the browser with an HTTP status 303 (See Other) to redirect
}
void handleNotFound()
{
  server.send(404, "text/plain", "404: Not found"); // Send HTTP status 404 (Not Found) when there's no handler for the URI in the request
}

You should be able to get some ideas from it