Passing Variables To C++ Through HTML

This is a discussion on Passing Variables To C++ Through HTML within the C++ Programming forums, part of the General Programming Boards category; I am trying to make an accounting program for my school snack bar (it's a massive project for computer class ...

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    5

    Passing Variables To C++ Through HTML

    I am trying to make an accounting program for my school snack bar (it's a massive project for computer class with every aspect documented...).

    My question is it possible to allow HTML to act as an interface to a c++ program. ie. can it take input, pass it to the program, and then accept new values in it's code?

    If this is not possible please include a few suggestions:

    Thanks for your time:
    Justin Hood

  2. #2
    Fingerstyle Guitarist taylorguitarman's Avatar
    Join Date
    Aug 2001
    Posts
    564
    Look into CGI programming.

  3. #3
    Normal vector Carlos's Avatar
    Join Date
    Sep 2001
    Location
    Budapest
    Posts
    463
    Take a closer look to the ActiveX thingie.

    I don't think there's a way to pass variables from HTML to C.
    HTML was not intended for such trickeries.

    Have fun!

  4. #4
    Registered User
    Join Date
    Nov 2001
    Posts
    17
    Look at Java too
    -----------------------------------------------
    everready

    To code, or not to code, that is the question.

    Well the answer is 'TO CODE' of cause

  5. #5
    Registered User
    Join Date
    Dec 2001
    Posts
    28
    I agree with the suggestion above....definitely look into CGI programming -- its far simpler than going into anything else. All you need to know is how to pass the variables via GET or PUT methods, and you're done.

  6. #6
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,786
    Originally posted by Carlos
    Take a closer look to the ActiveX thingie.

    I don't think there's a way to pass variables from HTML to C.
    HTML was not intended for such trickeries.

    Have fun!
    Its possible....

    HTML Variables are passed 2 ways;

    1. (GET) By tagging them to the end of the url after '?' (look at the URL of this page

    2. (POST) After the HTTP Headers

    Your C++ proggie could sit listning on port 80 and process this info, but it would be much more difficult that using Servlets, PHP, PERL or another CGI

  7. #7
    Registered User
    Join Date
    Aug 2001
    Location
    Fort Worth, TX
    Posts
    53
    CGI is the route to take for C++, but if you migrate to Java you can uses its Servlet Package that makes it fairly simple, once you are able to get the Servlet class incorperated into you Java enviroment.

  8. #8
    Registered User
    Join Date
    Jan 2002
    Posts
    5

    Thanks!!

    Thanks for your suggestions! I'll look into CGI...

    Cheers!

  9. #9
    Unregistered
    Guest
    although i dun know is it alrite to suggest this here.
    but i ready think u can try JavaBean which is implemented in Java.

    however it requried usage of jsp inorder to do so.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. basic question about global variables
    By radeberger in forum C++ Programming
    Replies: 0
    Last Post: 04-06-2009, 12:54 AM
  2. help needed passing variables
    By pastitprogram in forum C++ Programming
    Replies: 8
    Last Post: 06-27-2008, 06:07 AM
  3. passing variables from main to another function
    By bazzano in forum C Programming
    Replies: 2
    Last Post: 03-06-2006, 06:30 PM
  4. passing variables
    By 182 in forum C++ Programming
    Replies: 12
    Last Post: 02-15-2006, 01:52 PM
  5. passing variables
    By Leeman_s in forum C++ Programming
    Replies: 3
    Last Post: 10-04-2001, 02:41 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21