thegasman2000:
I am sorry I dont it 
I understand that were looking for the start point and starting to "record" then on the end point stopping "recording" but I dont get how the variable brightnessVal gets set during this recording...
In your example:
GET /?LEDWHITE=100&submit=Send+White+LED+Level HTTP/1.1
c will be 'G' first. That's not the start marker, so recording doesn't happen.
c will then be 'E'. That's not the start marker, so recording doesn't happen.
c will then be 'T'. That's not the start marker, so recording doesn't happen.
c will then be ' '. That's not the start marker, so recording doesn't happen.
c will then be '/'. That's not the start marker, so recording doesn't happen.
c will then be '?'. That's not the start marker, so recording doesn't happen.
Eventually, c gets to be '=', so recording happens, and brightnessVal is set to 0.
c will then be '1', which is not the start marker, is not the end marker, and is a digit. So, brightnessVal is multiplied by 10, becoming 0, and '1' - '0' is added. Since '1' - '0' is 1, brightnessVal is now 1.
c will then be '0', which is not the start marker, is not the end marker, and is a digit. So, brightnessVal is multiplied by 10, becoming 10, and '0' - '0' is added. Since '0' - '0' is 0, brightnessVal is now 10.
c will then be '0', which is not the start marker, is not the end marker, and is a digit. So, brightnessVal is multiplied by 10, becoming 100, and '0' - '0' is added. Since '0' - '0' is 0, brightnessVal is now 100.
c will then be '&', which is not the start marker but is the end marker, so recording stops, and brightnessVal is complete.