           Serial.println("writing eeprom DHCP enable:"); 
           EEPROM.write(128, qdhcpEnable[0]);
           Serial.print("Wrote: ");
-            Serial.println(qdhcpEnable[0]); 
+          Serial.println(qdhcpEnable[0]); 
+
+          
+          char buf[16];
+          char *digits;
+          int k;
+          
+          String qIP = server.arg("IP");
+          qIP.toCharArray(buf,15);          
+          digits = strtok(buf, ".");
+          k = 129;
+          while(digits != NULL ) {
+              Serial.println(atoi(digits));   
+              EEPROM.write(k,atoi(digits));
+              k++; 
+              digits = strtok(NULL, ".");
+           }
+
+          String qsubnet = server.arg("subnet");
+          qsubnet.toCharArray(buf,15);          
+          digits = strtok(buf, ".");
+          k = 133;
+          while(digits != NULL ) {
+              Serial.println(atoi(digits));   
+              EEPROM.write(k,atoi(digits));
+              k++; 
+              digits = strtok(NULL, ".");
+           }
+
+           
+
+//            for (int i = 0; i < qIP.length(); ++i)
+//            {
+//              EEPROM.write(129+i, qIP[i]);
+//              Serial.print("Wrote: ");
+//              Serial.println(qIP[i]); 
+//            } 
+            
           EEPROM.commit();
           content = "{\"Success\":\"saved to eeprom... reset to boot into new wifi\"}";
           statusCode = 200;

        content += st;
        content += "<div class='redInput'><label>Key: </label><input type='password' name='pass' length=64></div>";
        content += "<h4>Select IP Address Mode</h4>";
        content += "<div><select name='dhcpEnable'>";
        content += "<option value='T' selected>DHCP</option>";
        content += "<option value='F'>Fixed</option>";
        content += "</select></div>";
        content += "<input type='submit' value='Enter'>";
        content += "</form>";
        content += "</body>";
        content += "</html>";
        server.send(200, "text/html", content);  

  IPAddress esubnet(EEPROM.read(133),EEPROM.read(134),EEPROM.read(135),EEPROM.read(136));
  IPAddress egateway(EEPROM.read(137),EEPROM.read(138),EEPROM.read(139),EEPROM.read(140));
  IPAddress edns(EEPROM.read(141),EEPROM.read(142),EEPROM.read(143),EEPROM.read(144));

  Serial.println("Connecting with fixed IP");
  Serial.print("IP: ");
  Serial.println(estaticIP); 
  Serial.print("subnet: ");
  Serial.println(esubnet); 
  WiFi.mode(WIFI_STA);
