Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 16 Feb 1999 20:37:07 +1100 (EST)
From:      Keith Anderson <keith@apcs.com.au>
To:        questions@FreeBSD.ORG
Subject:   www cgi forms 
Message-ID:  <XFMail.990216203707.keith@apcs.com.au>

next in thread | raw e-mail | index | archive | help
Hi All

I'm having a problem passing information to my cgi's.
I made a little test program to echo back anything I sent it (see below eecho.c)

sf I use <ISINDEX> all works fine but if I try a form nothing happens it runs
the script but with no arg's


Can some one point me to the right direction on this one.

Thanks 

Keith Anderson



<snip eecho.c>
#include <stdio.h>
#include <stdlib.h>

int a;

main(int argc, char * argv[])
{
printf("Content-type: text/html\n\n");
printf("<html>\n<head>\n<title>Arg Test</title>\n</head><body>\n");
printf("argc = %d\n",argc-1);
if (argc > 1)
        {
        printf("Args  are\n");
        for (a = 1;a<argc;a++)
                printf("%s\n",argv[a]);
        }
printf("</body>\n</html>\n");
exit(0);
}

</snip>
---

"The box said 'Requires Windows 95, NT, or better,' so I installed FreeBSD."


----------------------------------
E-Mail: Keith Anderson <keith@apcs.com.au>
Date: 16-Feb-99
Time: 20:20:29
Satelite Service 64K to 2Meg
This message was sent by XFMail
----------------------------------

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.990216203707.keith>