home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 13
/
amigaformatcd13.iso
/
-in_the_mag-
/
html_tutorial
/
s00_cgi1.cpp
< prev
next >
Wrap
C/C++ Source or Header
|
1997-03-07
|
623b
|
28 lines
enum bool { false, true };
#define NO_MAP
#include <iostream.h>
#include <stdlib.h>
#include "parse.h"
#include "parse.cpp"
void main()
{
char *query_str = getenv("QUERY_STRING");
Parse list( query_str == 0 ?
"tag=one&name=mike&action=%2B10%25&tag=two&log=~mas/log&tag=three" :
query_str );
cout << "name = " << list.get_item_n( "name" ) << "\n";
cout << "action= " << list.get_item_n( "action" ) << "\n";
cout << "log = " << list.get_item_n( "log", 1, true ) << "\n";
for ( int i=1; i<=4; i++ )
{
cout << "tag (" << i << ") = ";
cout << list.get_item_n( "tag" , i ) << "\n";
}
}