tags:

views:

79

answers:

3
+1  Q: 

C, HTML and CGI

Hi ,

I have a functionality written in C. I have to give input through the html page and the operation to be processed in C (on submit of a button) and the result has to be given to the same html page.

Please help me out by given some simple examples.

+1  A: 

Here is a tutorial. You will (of course) need admin access to the web server where you wish to access your program.

unwind
I don't think it's necessary to have admin access to the web server.
Kinopiko
A: 

Hi,

I have gone through the tutorial mentioned. I want to display the result in the same page instead of going to the other page. How can I do that? Do I need any interface between C and HTML?

MalarN
A: 

I have to give input through the html page and the operation to be processed in C (on submit of a button) and the result has to be given to the same html page.

It looks like you need to make an Ajax program in C.

Simplest example of CGI programming in C:

int main ()
{
     printf ("Content-Type: text/plain\n\nHello world\n");
}

The C bit is actually quite easy, the Ajax bit is more involved.

Kinopiko