aboutsummaryrefslogtreecommitdiff
path: root/t/front.tc
diff options
context:
space:
mode:
Diffstat (limited to 't/front.tc')
-rw-r--r--t/front.tc25
1 files changed, 12 insertions, 13 deletions
diff --git a/t/front.tc b/t/front.tc
index 89e665a..3307c21 100644
--- a/t/front.tc
+++ b/t/front.tc
@@ -1,16 +1,15 @@
printf("<h1>");
printf("%s", site.name );
-printf("</h1>\n");
- printf("Hello world!"); printf("\n<br>\nRequest method: ");
+printf("</h1>\n<p>Thanks for the ");
printf("%s", getenv("REQUEST_METHOD") );
-printf("<br>\n");
- char *a, *b, *bv;
- a = nextparam(512);
- printf("%s (%d)<br>", a, TRUNCATED(a));
- b = nextparam(512);
- printf("%s (%d)<br>", b, TRUNCATED(b));
- bv = split(b);
- printf("'%s' contains '%s'<br>", b, bv);
- printf("Next: %s\n", nextparam(512));
- printf("Next: %s\n", nextparam(512));
-printf("\n");
+printf(" request!</p>\n<table border=\"1\">\n <tr style=\"font-weight: bold;\">\n <td style=\"width: 60px;\">Key</td>\n <td style=\"width: 140px;\">Value</td>\n </tr>\n ");
+ char *p, *v;
+ while(p = nextparam(GET, 512)){
+ v = split(p);
+ printf("\n <tr>\n <td>");
+printf("%s", p );
+printf("</td>\n <td>");
+printf("%s", v );
+printf("</td>\n </tr>\n ");
+ }
+ printf("\n</table>");