File: form1.c

package info (click to toggle)
libcgi 1.0-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 940 kB
  • ctags: 268
  • sloc: sh: 2,700; ansic: 2,134; makefile: 232
file content (52 lines) | stat: -rw-r--r-- 1,032 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <stdio.h>
#include "cgi.h"

void example_description()
{
	puts(""
	"LibCGI Examples - Simple form<br>"
	"This example shows you various ways to manipulate HTML<br>"
	"forms and data<br><br>"
	"");
}

int main(void)
{
	cgi_init();
	cgi_init_headers();

	example_description();

	// Init the HTML page
	puts(""
	"<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>"
	"<html>"
	"<head>"
	" "
	  "<meta http-equiv='content-type' content='text/html; charset=ISO-8859-1'>"
	"	"
	 "   <meta name='author' content='Rafael Steil'>"
	  "    <title>LIBCGI Examples</title>"
	   "   </head>"
	    "  <body text='#000000' bgcolor='#ffffff' link='#0000ee' vlink='#551a8b' alink='#0000ee'>"
	     " <table cellpadding='0' cellspacing='0' border='0' width='90%' align='Center' bgcolor='#33cc00'>"
	      "  <tbody>"
	"	  <tr>"
	"");
	
	cgi_include("top.inc");
	cgi_include("left.inc");
	cgi_include("main.inc");

	puts(""
	   "</tr>"
	   " </tbody>"
	   "</table>"
	   "</body>"
	   "</html>"
	"");
	
	cgi_end();

	return 0;
}