Solved

Problems Starting out

Posted on 1998-12-17
2
449 Views
Last Modified: 2013-12-25
Having a small problem trying to get some CGI scription stuff started....

My understanding is that I can use a little c program and run that from the browser and by using the standard output can then receive stuff back from the program... however it doesn't seem to work at the moment very well.... here is a copy of the html and c source that I am using


<HTML>
<head>
<title>Blah Testy thing </title>
</head>
<body>
<hr>
<p>Hello let us try this then eh ?

<form action="///d|/testcgi.exe" method="post">
<input type="radio" name="a" checked> Blah<p>
<input type="radio" name="a"> Blah 2
<p><input type="submit" value="Go Away You Stupid Program">
</form>

</body>
</html>


and the c source

        #include <stdio.h>


       void main()
        {

              printf("Content-Type: text/html\n\n");
              printf("<html> <head>\n");
              printf("<title>CGI Environment</title>\n");
              printf("</head>\n");
              printf("<body>\n");
              printf("<h1>CGI Environment</h1>\n");

              printf("<p><p>Hello World.... yayayyayay\n");
              printf("</body> </html>\n");
        }

The c program I just took out of a primer book thingi on cgi scripting... anyway I have tried this using NEtscape Navigator 4.5 and IE 4.0 but don't seem to be having any luck... and help would be much appreciated

thanks

0
Comment
Question by:jaredc071598
2 Comments
 
LVL 8

Accepted Solution

by:
MaDdUCK earned 50 total points
ID: 1830188
you are tyring to execute the CGI locally and thus the program will pop up. You need to access a CGI through a webserver, only then will it work. Otherwise your code seems fine. If you don't have a webserver, Microsoft Personal Web Server ships with Windows 95/98 and FrontPage 98, and Windows NT has IIS, so you need to install these locally for testing..
0
 

Author Comment

by:jaredc071598
ID: 1830189
Thank-you muchly, we wondered if this might be the problem, but thanks for confirming it
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I hope you'll find this tutorial useful and interesting. So let's try to extend Tcl with a new package.  For anyone more deeply interested please check out the book "Practical Programming in Tcl and Tk". It's really one of the best written books abo‚Ķ
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now