Solved

Problems Starting out

Posted on 1998-12-17
2
452 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

770 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