I have 17 years programming experience out of which 7 years in C/C++. In fact my biggest problem is some confusion. I donot know why I am not able to test CGI programs. It is just a matter of some one showing me running of CGI program.
Let me explain to you what I have done in CGI programming and why I have failed.
* I have installed a omni HTTPd web server on my pentium machine running Win95.
* I have written the following small C program and compiled it as DOS program in BC++ 3.1
printf("Content-type: text/html%c%c", 10, 10);
printf("I detect the following Web Browser: %s\n",
Following is its html document
<form action = "cgi-bin/browser.exe" method="post" target="main">
I can tell what Web Broser you're using<p>
Press OK to <p>
<input type="submit" value="OK">
* OmniHTTPd server is installed in d:\httpd directory
browser.exe is stored in d:\httpd\cgi-bin directory
browser.htm is stored in d:\httpd\htdoc
* When I open d:\httpd\htdoc in Internet Explorer (or navigator), and click
the OK switch, the system displays "File down load dialog". Where as I expected it to tell me name of browser
* Kindly let me know whether some thing wrong with my program, its html or installation of my web server. If you think neccessary, I will send you browser.exe so that you may check it on your server and let me know.