dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Cannot read form values in CGI

  1. #1
    Join Date
    Nov 2009
    Posts
    19

    Cannot read form values in CGI

    My HTML submits a form as following:
    <FORM id=form1 name=form1 onsubmit="return submitForm();"
    action="" method=post> (now comes defintion of some fields..)
    function submitForm()
    {
    if (validateGcmForm() == true)
    {
    document.form1.action = "http://" + parent.location.host + "/mcc7500/cgi- bin/gcmconfwebappl" ;
    return true ;
    }
    return false ;
    }

    My C++ CGI was indeed invoked but it couldn't find any value using cgicc::getElement().
    and even more, getenv("CONTENT_LENGTH") was NULL.

    however, looking at a protocol analyzer, I see that the a packet of "POST" type is sent to the server, and the names & values of all my fields were sent as well.

    Please help !
    Thanks,
    Goneni

  2. #2
    Join Date
    Nov 2009
    Posts
    19
    I also found out that the CGI's "REQUEST_METHOD" is "GET", altough looking at the protocol analyzer I see:
    "POST /mcc7500/cgi-bin/gcmconfwebappl HTTP/1.1 (application/x-www-form-urlencoded)"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles