Need help with some logic in my sketch.

Everything in that post up there ^^ is true. But like I said I found that sketch on the AsyncLab's site. A friend of mine helped me get to where I was at when I started asking questions. None of it made sense to me, either. I think I've figured it out now, though. I just got this done tonight:

#include <WiServer.h>
#include <string.h>

#define WIRELESS_MODE_INFRA 1
#define WIRELESS_MODE_ADHOC 2

#define ledPin1 5
#define ledPin2 6
#define ledPin3 9

// Wireless configuration parameters ----------------------------------------
unsigned char local_ip[]    = {192,168,1,225};   // IP address of WiShield
unsigned char gateway_ip[]  = {192,168,1,1};   // router or gateway IP address
unsigned char subnet_mask[] = {255,255,255,0}; // subnet mask for the local network
const prog_char ssid[] PROGMEM     = {"The Tardis"};   // max 32 bytes
unsigned char security_type = 3;  // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2

// WPA/WPA2 passphrase
const prog_char security_passphrase[] PROGMEM = {"biggerontheinside"}; // max 64 characters

// WEP 128-bit keys
// sample HEX keys
prog_uchar wep_keys[] PROGMEM = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, // Key 0
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 1
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // Key 2
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 // Key 3
};

// setup the wireless mode; infrastructure - connect to AP; adhoc - connect to another WiFi device
#define WIRELESS_MODE_INFRA	1
#define WIRELESS_MODE_ADHOC	2
unsigned char wireless_mode = WIRELESS_MODE_INFRA;
unsigned char ssid_len;
unsigned char security_passphrase_len;

// Webserver static content ------------------------------------------------
const prog_char wbHtmlOpen[] PROGMEM = {"<html>"};
const prog_char wbHeadOpen[] PROGMEM = {"<head>"};
const prog_char wbTitle[] PROGMEM = {"<title>Door Opener</title>"};
const prog_char wbMetaRefresh[] PROGMEM = {"<HTML><HEAD><meta http-equiv='REFRESH' content='60;url=/'></HEAD></HTML>"};
const prog_char wbHeadClose[] PROGMEM = {"</head>"};
const prog_char wbBodyOpen[] PROGMEM = {"<body>"};
const prog_char wbDoor1Open[] PROGMEM = {"<center><h1>Door 1 Open</h1></center>"};
const prog_char wbDoor1Closed[] PROGMEM = {"<center><h1>Door 1 Closed</h1></center>"};
const prog_char wbDoor2Open[] PROGMEM = {"<center><h1>Door 2 Open</h1></center>"};
const prog_char  wbDoor2Closed[] PROGMEM = {"<center><h1>Door 2 Closed</h1></center>"};
const prog_char wbDoor3Open[] PROGMEM = {"<center><h1>Door 3 Open</h1></center>"};
const prog_char wbDoor3Closed[] PROGMEM = {"<center><h1>Door 3 Closed</h1></center>"};
const prog_char wbDivPatterns[] PROGMEM = {"<center>GARAGE DOOR OPENER<center>\n<center>

"};
const prog_char wbDivPatterns2[] PROGMEM = {"<input type=\"submit\" onclick=\"location=\'/?LED1 \'\" value=\"Button 1 On\">
<input type=\"submit\" onclick=\"location=\'/?LED2 \'\" value=\"Button 2 On\">
<input type=\"submit\" onclick=\"location=\'/?LED3 \'\" value=\"Button 3 On\">

"};
const prog_char wbDivPatterns3[] PROGMEM = {"<input type=\"submit\" onclick=\"location=\'/?LED4 \'\" value=\"Button 1 Off\">
<input type=\"submit\" onclick=\"location=\'/?LED5 \'\" value=\"Button 2 Off\">
<input type=\"submit\" onclick=\"location=\'/?LED6 \'\" value=\"Button 3 Off\">
"};
const prog_char wbBodyClose[] PROGMEM = {"</body>"};
const prog_char wbHtmlClose[] PROGMEM = {"</html>"};


int incomingByte = 0;
int webnum = -1;
char ledChange;
char stateCounter;
char doorState;
// Methods ------------------------------------------------------------------

boolean sendPage(char* URL) {
  
 if (URL[1] == '?' && URL[2] == 'L' && URL[3] == 'E' && URL[4] == 'D') //url has a leading /
{
  ledChange = (int)(URL[5]) - 48;
  for (stateCounter = 0; stateCounter <6; stateCounter++)
  {
    if(ledChange == 1){
      digitalWrite(ledPin1, HIGH);
    }
    if(ledChange == 2){
      digitalWrite(ledPin2, HIGH);
    }
    if(ledChange == 3){
      digitalWrite(ledPin3,HIGH);
    }
    if(ledChange == 4){
      digitalWrite(ledPin1, LOW);
    }
    if(ledChange == 5){
      digitalWrite(ledPin2, LOW);
    }
    if(ledChange == 6){
      digitalWrite(ledPin3,LOW);
    }
 }
    WiServer.print("<HTML><HEAD><meta http-equiv='REFRESH' content='0;url=/'></HEAD></HTML>");
    return true;
}
 
  WiServer.println_P(wbHtmlOpen);
  WiServer.println_P(wbHeadOpen);
  WiServer.println_P(wbTitle);
  WiServer.println_P(wbMetaRefresh);
  WiServer.println_P(wbHeadClose);
  WiServer.println_P(wbBodyOpen);
  WiServer.println_P(wbDivPatterns);
  WiServer.println_P(wbDivPatterns2);
  WiServer.println_P(wbDivPatterns3);
    if(ledChange == 1){
    WiServer.println_P(wbDoor1Open);
  }
  if (ledChange == 2){
     WiServer.println_P(wbDoor2Open);
  }
  if (ledChange ==3) {
     WiServer.println_P(wbDoor3Open);
  }
  if(ledChange == 4){
    WiServer.println_P(wbDoor1Closed);
  }
  if(ledChange == 5){
    WiServer.println_P(wbDoor2Closed);
  }
  if (ledChange == 6){
    WiServer.println_P(wbDoor3Closed);
  }
  WiServer.println_P(wbBodyClose);
  WiServer.println_P(wbHtmlClose);
  return true;
}

void setup() {
//setup leds
 pinMode(ledPin1, OUTPUT);
 pinMode(ledPin2, OUTPUT);
 pinMode(ledPin3, OUTPUT);
 WiServer.init(sendPage);
}

void loop() {
   WiServer.server_task();
   delay(100);
}

But it still uses that ASCII thing (because I copied it from the previous sketch.) I'll take your words and fix my newest sketch. Thanks for taking the time to help.