## Cookie save data test

First name:
Last name :

Implement this section, if you want to set a cookie. *>------------------------------------------------------------------------------ HTM2COB-SET-COOKIE SECTION. *>------------------------------------------------------------------------------ *> write first-name cookie CALL "HTM2COB-POST" USING "firstname", FNAME END-CALL CALL "HTM2COB-SPEC-CHARS" USING FNAME, HTM-FNAME END-CALL *> always replace Line-Feed and Carriage-Return in cookie string INSPECT HTM-FNAME REPLACING ALL X"0A" BY '_' INSPECT HTM-FNAME REPLACING ALL X"0D" BY '_' INITIALIZE LNK-HTM2COB-SET-COOKIE SET V-SET OF LNK-COOKIE-FUNC OF LNK-HTM2COB-SET-COOKIE TO TRUE MOVE "first-name" TO LNK-COOKIE-NAME OF LNK-HTM2COB-SET-COOKIE MOVE HTM-FNAME TO LNK-COOKIE-VALUE OF LNK-HTM2COB-SET-COOKIE MOVE 1800 TO LNK-MAX-AGE-SEC OF LNK-HTM2COB-SET-COOKIE SET V-YES OF LNK-HTTPONLY-FLAG OF LNK-HTM2COB-SET-COOKIE TO TRUE CALL "HTM2COB-SET-COOKIE" USING LNK-HTM2COB-SET-COOKIE END-CALL DISPLAY FUNCTION TRIM(LNK-COOKIE-STR OF LNK-HTM2COB-SET-COOKIE) END-DISPLAY *> write last-name cookie CALL "HTM2COB-POST" USING "lastname", LNAME END-CALL CALL "HTM2COB-SPEC-CHARS" USING LNAME, HTM-LNAME END-CALL *> always replace Line-Feed and Carriage-Return in cookie string INSPECT HTM-LNAME REPLACING ALL X"0A" BY '_' INSPECT HTM-LNAME REPLACING ALL X"0D" BY '_' INITIALIZE LNK-HTM2COB-SET-COOKIE SET V-SET OF LNK-COOKIE-FUNC OF LNK-HTM2COB-SET-COOKIE TO TRUE MOVE "last-name" TO LNK-COOKIE-NAME OF LNK-HTM2COB-SET-COOKIE MOVE HTM-LNAME TO LNK-COOKIE-VALUE OF LNK-HTM2COB-SET-COOKIE MOVE 1800 TO LNK-MAX-AGE-SEC OF LNK-HTM2COB-SET-COOKIE SET V-YES OF LNK-HTTPONLY-FLAG OF LNK-HTM2COB-SET-COOKIE TO TRUE CALL "HTM2COB-SET-COOKIE" USING LNK-HTM2COB-SET-COOKIE END-CALL *> The last DISPLAY in this section is always with "WITH NO ADVANCING" DISPLAY FUNCTION TRIM(LNK-COOKIE-STR OF LNK-HTM2COB-SET-COOKIE) WITH NO ADVANCING END-DISPLAY . EXIT SECTION . ?>