Trying to turn off a 4 devices and their status f lags with 1 input button

// declare variables

int     ledPin = 6;                // LED1 
int     heatpin = 7;               // ANTENNA
int     aedpin = 5;                // LED3  
int     fedpin = 8;                // fE PWR 
int     medpin = 9;                // me - anolog pin 9 for fan control
int     sensorPin = A0;            // analog in 0 forlight sense
int     sensorValue = 0;           // integer for the analog sensor
int     PIRstate = 0;              // variable for PIR sensor status
int     PIR = 2;                   // PIR sensor is connected to digital pin 2
int     motorlevel = 0;                // motor
String  readString = String(30);   // string for fetching data from address
boolean LEDON = false;             // LED1 status flag
boolean HEDON = false;             // ANTENNA status flag  
boolean AEDON = false;             // led3 status AE
boolean FEDON = false;             // power FE pin status
boolean MEDON = false;            // status off
boolean MEDON1 = false;            //MED SPEED STATUS ON
boolean PEDON = false;              // all devices status off


void setup()
{    
  
  Ethernet.begin(mac, ip, gateway, subnet ); //start Ethernet

  pinMode(ledPin, OUTPUT); //Set pin 6 to output
  pinMode(heatpin, OUTPUT); // set pin 7 to output
  pinMode(aedpin, OUTPUT); // set pin 5 to output
  pinMode(fedpin, OUTPUT); // set pin 8 to output
  pinMode(PIR, INPUT); // set pir to input
  pinMode(medpin, OUTPUT); // set pin a3 to output
  
  sensorValue = analogRead(sensorPin);
  }
[code]  
void loop()

 EthernetClient client = server.available();  // Create a client connection
  
  if (client) {
    boolean current_line_is_blank = true; //new
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        // if we've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // send a reply
        
        if (readString.length() < 30) { //read char by char HTTP request
          readString.concat(c); 
        } //store characters to string
// HTML Code  

if (c == '\n' && current_line_is_blank) {
          
          // HTML Code
          client.println(F("HTTP/1.1 200 OK")); //output HTML data starting with standard header
          client.println(F("Content-Type: text/html"));
          client.println();
          client.print(F("<body style=background-color:BLACK>")); //set background to BLACK

          // Auto refresh webpage every 60 seconds
          client.println(F("<META HTTP-EQUIV=REFRESH CONTENT=60 URL=>"));
          client.println("<center>");
          client.println(F("<font color=’green’><h1>INTERNET -- CONTROL </font></h1>/"));//send first heading
          client.println(F("<hr />"));
          client.println(F("<font color=’#0D8112’ size=’5?> "));
          client.println("</center>");
          motorlevel = 0;
      }   
  //indexOf("L=")

        if (c == '\n') { //if HTTP request has ended

          
          int Le = readString.indexOf("L="); //led here is a key component of where
          int He = readString.indexOf("H="); //the status is being read by the arduino
          int Ae = readString.indexOf("A=");
          int Fe = readString.indexOf("F=");
          int Me = readString.indexOf("M="); //motor / fan 
          int Pe = readString.indexOf("P="); //master all OFF

     // Check if anything  should be lighted or turned on

            if (Le > 1){

            if (readString.substring(Le,(Le+3)) == "L=1") { //led has to be turned ON
              digitalWrite(ledPin, HIGH); // set the LED on
              
              LEDON = true;
            }

            if (readString.substring(Le,(Le+3)) == "L=0") {
              //led has to be turned OFF
              digitalWrite(ledPin, LOW); // set the LED OFF
              
              LEDON = false;
            }
          }

// all power to off check

if (Pe > 1){

           if (readString.substring(Pe,(Pe+3)) == "P=0") { //ALL OFF
            motorlevel = 0;
            analogWrite(medpin, motorlevel); // set the LED1 off
            digitalWrite(ledPin, LOW); // set the LED OFF
            digitalWrite(heatpin, LOW); // set the heat OFF
           digitalWrite(aedpin, LOW); // set the ANT OFF
           digitalWrite(fedpin, LOW); // set the PWR OFF
           PEDON = true;
             
            }  }
           client.print(F("<form method=get name=LED>"));
           client.print(F("<input type='radio' name='L' value='1'>LED1 ON
"));
           client.print(F("<input type='radio' name='L' value='0'>LED1 OFF

"));
           client.print(F("<input type='radio' name='P' value='0'>ALL OFF

"));
           client.println(F("<input type=submit value=submit></form>"));
           client.println(F("<hr />"));


// DETERMINE WHAT STATUS TO PRINT  
         
          client.print(F("<font size=’5?>LED1 status: "));
          if (LEDON == true) {
            client.println(F("<font color='#FF0000' size=’5?>ON</font>")); //red

          }
          else {
            client.println(F("<font color='#0099FF' size=’5?>OFF</font>")); //blue

          }

// check for all off status condition, if so turn all status flags  to off
    
           if (PEDON == true) {  
                
           LEDON = false;             // LED1 status off
           HEDON = false;             // ANTENNA status off 
           AEDON = false;             // led3 status AE off
           FEDON = false;             // power FE pin status off
            MEDON = false;
            MEDON1 = false;            // off  
             
           client.println(F("<font color='#0099FF' size=’5?>OFF</font>")); //blue


           }
  1. code is used to turn on /off several devices by using the input button commands - this works
    I did not include all the device code as it might be to long to post

Problem:
I am trying to add another input command which would turn all devices and their status off at once.

Joe

[/code]

Problem:
I am trying to add another input command which would turn all devices and their status off at once.

Sorry but I don't understand what your problem is.
You have commands to switch thing individually, well just have an other command that turns all the devices off.