Skip to content

Instantly share code, notes, and snippets.

@rpt
Created May 15, 2010 14:28
Show Gist options
  • Save rpt/402218 to your computer and use it in GitHub Desktop.
Save rpt/402218 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <cgi.h>
#include <stdlib.h>
int main() {
s_cgi *cgi;
char *check[5];
int i, hold[5];
cgi = cgiInit();
check[0] = cgiGetValue(cgi, "1");
check[1] = cgiGetValue(cgi, "2");
check[2] = cgiGetValue(cgi, "3");
check[3] = cgiGetValue(cgi, "4");
check[4] = cgiGetValue(cgi, "5");
for (i=0; i<5; i++) {
if (strcmp(check[i], "on") == 0)
hold[i] = 0;
else hold[i] = 1;
printf("%i ", hold[i]);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment