FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour CGI
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
CGI
Posted: Sun Nov 27, 2005 12:29 PM
Dear friends, I have a problem to get CGI to work (any language, I tried
xHarbour and C, it used to work the last time I tried it...). I can write the
results to the browser (stdout) but I cannot receive anything from stdin:

localhost/mysite/test.htm

<HTML>
  <BODY>
    <FORM METHOD = "post" ACTION = "test.exe?Param=Test">
      <INPUT TYPE = "submit" VALUE = "Send">
    </FORM>
  </BODY>
</HTML>


TEST.EXE is:

#include "Simpleio.ch"


FUNCTION MAIN()

    ?? "Content-type: text/html"
    ?
    ? "<HTML>"
    ? "<BODY>"
    ? "Received: " + FREADSTR( 0, 256 ) + "<BR>"
    ? "</BODY>"
    ? "</HTML>"

    RETURN NIL


The result is an empty string.

"Received:"

What am I missing?

Thank you in advance for any help.

EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
CGI
Posted: Sun Nov 27, 2005 12:40 PM

Enrico,

I have moved it to this section, as I understand it is important for more users :)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: CGI
Posted: Sun Nov 27, 2005 09:12 PM
Solved:

<HTML>
  <BODY>
    <FORM METHOD = "post" ACTION = "test.exe">
      <INPUT TYPE = "text" NAME = "Param">
      <INPUT TYPE = "submit" VALUE = "Send">
    </FORM>
  </BODY>
</HTML>


EMG

Continue the discussion