I am working on BVS stone on CGIDEV2 book and I have encountered a
problem. I have an HTML file that asks for first name an last name
then press a submit button and it should tell you what you entered.
On the address line of the browser it appears that it is passing the
names, but they are not displaying in the page. Below is an example
of what is showing up in the address line:
http://<myas400:8014>/cgi-bin/procinput1?
cgiinp01=firstname&cgiinp02=lastname
Below is an example of the HTML files and the RPG:
input1.html file:
<html>
<body>
Please enter your first and last name, then press the
Submit button.<br><br>
<form action="/CGI-BIN/procinput1">
First Name:<input type="text" name="CGIINP01"><br>
Last Name:<input type="text" name="CGIINP02"><br>
<input type="Submit">
</form>
</body>
</html>
procinput1.html file:
/$all
Content-type: text/html
<html>
<body>
You entered the following information:
<br>
<br>
Your first name is: <B>/%FIRSTNAME%/</B>
<br>
Your last name is: <B>/%LASTNAME%/</B>
</body>
</html>
procinput1 - RPGLE program:
*************************************
H DFTACTGRP(*NO) BNDDIR('SPCGILIB/CGIDEV2BND')
************************************************
*
Prototypes
************************************************
/copy SPCGILIB/QRPGLESRC,PROTOTYPEB
/copy SPCGILIB/QRPGLESRC,USEC
************************************************
* VARIABLES USED IN CGI PROGRAMS
************************************************
/copy SPCGILIB/qrpglesrc,VARIABLES1
************************************************
C EXSR $Input
C callp ClrHtmlBuffer
C callp GetHtml('HTMLSRC':'SPCGILIB':'PROCINPUT1'
C callp updHTMLvar('FIRSTNAME':CGIINP01)
C callp updHTMLvar('LASTNAME':CGIINP02)
C callp wrtsection('all')
C callp wrtsection('*fini')
C SetOn LR
************************************************
* Read Input from web page
************************************************
C $input BEGSR
*
/copy SPCGILIB/qrpglesrc,PROLOG1
*
C ENDSR
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/wbFolB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Easy400Group/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/