Thread: Recording Data sent to program by Form

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    1

    Recording Data sent to program by Form

    I have seen many source codes for having C++ form processing.
    I need some help, all I want the program to do is accept the
    html form, and then record the 3 or 4 text fields to a file. I know
    how to make it record to a file. But I don't konw how to make it
    accept the contents of a form, and how to make it extract the text box contents or values.
    when you do a action=my.exe
    it tries to download the exe.
    The server is a Win machine. And i have begineer to Novice experience,
    any help is appreciated.
    Thanks

  2. #2
    Registered User
    Join Date
    Sep 2001
    Posts
    4

    its the

    is the data brought in via a cgi script? because you said it was info from a htlm form..so try to get the data from the file that the cgi script saves the data to..then ite easy

  3. #3
    Registered User
    Join Date
    Aug 2001
    Posts
    155
    This process isn't as simple as it logically seems as there is no standard way to handle files as there is no standard file. The process will depend on which compiler you are using, what platform you are coding for, etc. I don't know html but I believe there are basically text files with a series of tags indicating whether the information contained between the tags are graphical or text in nature. C++ handles the graphical stuff as bitmaps or some other graphical format. The text stuff can be stored in any number of variable types including text per se using strings of some sort or ocassionally a single char variable or numerical formating with either int, double, or float variables or some user defined combination of the basic types available called a class or struct or typedef or enum or whatever. Strings can be the classic c_style (a.k.a null terminated char arrays) or some string class (such as the STL string class, CString (in VC++), AnsiString, apstring, TString(in BCB), user defined string class, etc.). File handling per se is with either file pointers (FILE *) (C style file handling which works in C++ too) or streams (C++ only, either using fstream with you specifying how the fstream is to be used at any given point in the program or with dedicated stream types like ifstream/ofstream). Lot's of options to keep things as flexible as possible for you, although it is frustratingly complex to start out with. Keep at it and you will learn all the details eventually.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do you make a program send data to the printer?
    By Sintu in forum C++ Programming
    Replies: 19
    Last Post: 10-20-2005, 07:22 PM
  2. Program Crashing
    By Pressure in forum C Programming
    Replies: 3
    Last Post: 04-18-2005, 10:28 PM
  3. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM
  4. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  5. Warnings, warnings, warnings?
    By spentdome in forum C Programming
    Replies: 25
    Last Post: 05-27-2002, 06:49 PM