Webduino Programming

I edited the buzzer example for the webduino library to control a rgb LED using radio buttons(I'm only using two colours for this test). When I enter the IP, select the colour and hit submit, the LED doesn't go on and the form resets. I'm a bit new to Arduino coding, so I might have missed something obvious.

/* Web_Buzzer.pde - example sketch for Webduino library */

#include "Ethernet.h"
#include "WebServer.h"

/* CHANGE THIS TO YOUR OWN UNIQUE VALUE.  The MAC number should be
 * different from any other devices on your network or you'll have
 * problems receiving packets. */
static uint8_t mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

/* CHANGE THIS TO MATCH YOUR HOST NETWORK.  Most home networks are in
 * the 192.168.0.XXX or 192.168.1.XXX subrange.  Pick an address
 * that's not in use and isn't going to be automatically allocated by
 * DHCP from your router. */
static uint8_t ip[] = { 192, 168, 1, 64 };

/* all URLs on this server will start with /buzz because of how we
 * define the PREFIX value.  We also will listen on port 80, the
 * standard HTTP service port */
#define PREFIX "/buzz"
WebServer webserver(PREFIX, 80);

/* the piezo speaker on the Danger Shield is on PWM output pin #3 */
#define BUZZER_PIN 3

/* this is the number of microseconds to wait after turning the
 * speaker on before turning it off. */
int buzzDelay = 0;

/* toggle is used to only turn on the speaker every other loop
iteration. */
char toggle = 0;

/* This command is set as the default command for the server.  It
 * handles both GET and POST requests.  For a GET, it returns a simple
 * page with some buttons.  For a POST, it saves the value posted to
 * the buzzDelay variable, affecting the output of the speaker */
void buzzCmd(WebServer &server, WebServer::ConnectionType type, char *url_tail, bool tail_complete)
{
  if (type == WebServer::POST)
  {
    bool repeat;
    char name[16], value[16];
    do
    {
      /* readPOSTparam returns false when there are no more parameters
       * to read from the input.  We pass in buffers for it to store
       * the name and value strings along with the length of those
       * buffers. */
      repeat = server.readPOSTparam(name, 16, value, 16);

      /* this is a standard string comparison function.  It returns 0
       * when there's an exact match.  We're looking for a parameter
       * named "buzz" here. */
      if (strcmp(name, "buzz") == 0)
      {
      /* use the STRing TO Unsigned Long function to turn the string
       * version of the delay number into our integer buzzDelay
       * variable */
        buzzDelay = strtoul(value, NULL, 10);
      }
    } while (repeat);
    
    // after procesing the POST data, tell the web browser to reload
    // the page using a GET method. 
    server.httpSeeOther(PREFIX);
    return;
  }

  /* for a GET or HEAD, send the standard "it's all OK headers" */
  server.httpSuccess();

  /* we don't output the body for a HEAD request */
  if (type == WebServer::GET)
  {
    /* store the HTML in program memory using the P macro */
    P(message) = 
      "<html><head><title>Webduino Buzzer Example</title>"
      "<body>"
      "<h1>Test the Buzzer!</h1>"
      "<form action='/buzz' method='POST'>"
      "<p><input type='radio' name='buzz' value='0'>Off</button></p>"
      "<p><input type='radio' name='buzz' value='1'>Colour 1</button></p>"
      "<p><input type='radio' name='buzz' value='2'>Colour 2</button></p>"
      "<p><input type='submit' value='Submit'/></p>"
      "</form></body></html>";

    server.printP(message);
  }
}

void setup()
{
  // set the PWM output for the buzzer to out
  pinMode(5, OUTPUT);
  pinMode(4, OUTPUT);

  // setup the Ehternet library to talk to the Wiznet board
  Ethernet.begin(mac, ip);

  /* register our default command (activated with the request of
   * http://x.x.x.x/buzz */
  webserver.setDefaultCommand(&buzzCmd);

  /* start the server to wait for connections */
  webserver.begin();
}

void loop()
{
  // process incoming connections one at a time forever
  webserver.processConnection();

  /* every other time through the loop, turn on and off the speaker if
   * our delay isn't set to 0. */
  if (buzzDelay == 0)
  {
    digitalWrite(5, LOW);
    digitalWrite(4, LOW);
  }
    if (buzzDelay == 1)
  {
    digitalWrite(4, HIGH);
  }
    if (buzzDelay == 2)
  {
    digitalWrite(5, HIGH);
  }  
}