topical media & game development
lib-ch-example-ref-cgi-getForms.cgi / cgi
#!/bin/ch
/* Copyright (c) 2001 by SoftIntegration, Inc. All Rights Reserved */
include <cgi.h>
int main() {
class CResponse Response;
class CRequest Request;
chstrarray value;
int total;
int i;
Response.begin();
Response.title("Test of Request.getForms");
printf("<H1> The Result of Test of Request.getForms </H1>
\n ");
//get names
total = Request.getForms("name", value);
printf("name is : \n");
for (i = 0; i < total; i++)
if (value[i] != NULL)
printf("\%s <br>\n", value[i]);
if (total ==0)
printf("NULL");
printf("<p>\n");
//get favorites
total = Request.getForms("flavor", value);
printf("number of selected flavors is : \%d <br>\n", total);
printf("flavor is : <br>\n");
for (i = 0; i < total; i++)
if (value[i] != NULL)
printf("\%s <br>\n", value[i]);
Response.end();
}
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.