Question:

Is it possible to connect c(as back end) with html(as front end)?

by  |  earlier

0 LIKES UnLike

Is it possible to connect c(as back end) with html(as front end)?

 Tags:

   Report

6 ANSWERS


  1. In what way? Do you want to make a C program to parse HTML? Because HTML doesn't actually process anything, so it can't send information to anything else because there is none.


  2. yes it is possible.

    but it requires advance knowledge about C language...

    much tedious task

    you can try ASP(active server page) it helps you to connect your HTML pages with the database easily.

  3. Yes. In Deitel and Deitel's Learn How to Program C++, they explain how in the later chapters of the book (Chapter 16).

    Check Ares.

  4. If you're talking about what the above poster said, "parsing html files" then yes.  It isn't hard either, you use the printf function to do all the work.

    It is called CGI, by the way.  Common Gateway Interface (not computer generated imagery in this case lol).  A CGI allows your programs to interact with the web server.  Apache for instance, has a folder called a cgi-bin, once you have located that folder, compile this program::

    #include <stdio.h>

    int main(void)

    {

    printf("Content-Type: text/html\n\n");

    printf("<html><body><b>yay It works!</b></body></html>");

    return 0;

    }

    then just throw the binary file (whatever.exe) in the cgi-bin (though I suggest changing the ".exe" to ".cgi" or something related)

    Then just browse to the directory it's in, something such as:

    http://localhost/cgi-bin/nameofbinary.ex...

    And there you go.  Also, the first line:

    printf("Content-Type: text/html\n\n");

    is important, you'll get a 500 error if you don't include that.  You even need the two \n\n at the end.  :)

    I can also give you a form example, if you email me on yahoo I'll show you how to process them.

  5. I think ur trying to do something like this.....

    using the interface of html

    and the calculation power of C.

    going to design some html interface to get data from user,

    and try to process it using C, then displaying the result as html...

    is this ur idea???

    if it is so, it can be done.....

  6. I doubt it, C language was designed for implementing system software, it is also widely used for developing application software. while HTML is the predominant markup language for web pages. try Java if anything after all it's very similar to C and C++

Question Stats

Latest activity: earlier.
This question has 6 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.