send instruction to cgi from a function

hi

please help me !!

i wan display the state of a led on the web pages and changing it on a switch click on protoboard

it the same like toogleswitch on samples but adding a switch control and displaying changes on html

the main probleme is with the httpstate !!