CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: CGI question

  1. #1
    Join Date
    Mar 1999
    Posts
    1

    CGI question



    I have some questions about CGI scripting. I would like to write an app where I can build a command that I would send to my server over the web and have the information stored in a database. I have been reading a book on cgi programming and I would like to know: Do you have to build a script that resides on the server that will processes the command line that you are sending to the server; and how do you write a command line and where do you put it?

  2. #2
    Join Date
    Mar 2000
    Location
    Oxford, UK.
    Posts
    352

    Re: CGI question

    Well, I'm not an expert and I can't remember,
    but I reckon yes, you do
    have to put a .cgi script on the server.
    Put go.cgi in your cgi-bin directory, and send
    a request to:
    http://your_website/cgi-bin/go.cgi?input=blah
    When the webserver gets the request, it'll
    execute go.cgi.
    In go.cgi you get the (input,blah) pair with the CGI module like
    $blah = $cgi->Get("input");
    (or maybe it's a hash table: $blah = $cgi("input")
    or something
    and then you write something like
    if($blah == ...) etc. in go.cgi to process it
    and dump stuff in a database.

    \begin{signature}
    iauvlkasdjfoijbladjf
    \end{signature}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured