CGI

CGI

Postby Enrico Maria Giordano » 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

Code: Select all  Expand view
<HTML>
  <BODY>
    <FORM METHOD = "post" ACTION = "test.exe?Param=Test">
      <INPUT TYPE = "submit" VALUE = "Send">
    </FORM>
  </BODY>
</HTML>


TEST.EXE is:

Code: Select all  Expand view
#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
User avatar
Enrico Maria Giordano
 
Posts: 8512
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 41858
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Sun Nov 27, 2005 12:42 pm

Ok, thank you.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8512
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: CGI

Postby Enrico Maria Giordano » Sun Nov 27, 2005 9:12 pm

Solved:

Code: Select all  Expand view
<HTML>
  <BODY>
    <FORM METHOD = "post" ACTION = "test.exe">
      <INPUT TYPE = "text" NAME = "Param">
      <INPUT TYPE = "submit" VALUE = "Send">
    </FORM>
  </BODY>
</HTML>


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8512
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 48 guests