Return again to 4D's Design Environment. Bring up the 4D Explorer, and edit the Compiler_WEB method. Replace the contents of that method with this:
C_TEXT(WSC_t_NameFull)
C_TEXT(WSC_t_SSN)
C_TEXT(WSC_t_ErrorMessage)

Your Compiler_WEB method should now look like the one in the picture above. Close the method; your changes will be saved.
Now we will make some changes to the On Web Connection method. Delete the contents of this method, and replace it with the following:
C_TEXT($1;$2;$3;$4;$5;$6)
C_TEXT($tURL)
$tURL:=$1
Case
of
: ($tURL="/")
Compiler_WEB
SEND HTML FILE("Index.html")
: ($tURL="/4DCGI/form3")
WSC_t_ErrorMessage:=""
If
(WSC_t_SSN>"")
WSC_t_SSN:=String(Num(WSC_t_SSN))
End if
Case
of
: (Length(WSC_t_SSN)#9) & (WSC_t_NameFull="")
WSC_t_ErrorMessage:="SSN is invalid, and you didn't supply a name."
: (Length(WSC_t_SSN)#9)
WSC_t_ErrorMessage:="SSN is invalid."
: (WSC_t_NameFull="")
WSC_t_ErrorMessage:="You did not supply a name."
End case
If
(WSC_t_ErrorMessage="")
SEND HTML TEXT("Thank you, your form was accepted.")
Else
SEND HTML FILE("index.html")
End if
End case

Your On Web Connection method should now look like the one in the picture above. Previously, the On Web Connection method was much shorter. It only handled a request for the root document ($tURL="/"). It still handles the root document, but now it makes a call to Compiler_WEB before it sends out the root document with SEND HTML FILE("Index.html"). This is because the Index.html file now contains 4DVAR tags, and it is important that the variables be instantiated before the page is sent out.
Make sure you have saved the changes to the Compiler_WEB and On Web Connection methods. The easiest way to do this is just to close them; they will be saved automatically.
Open a new Web Browser window. Type in 127.0.0.1 in the address line again, and you should see something like this:

Try experimenting with this form. Submit it with both values blank. Add a name, but not a social security number. Or add a name, but an invalid Social Security Number (less than 9 numeric characters). If you supply some invalid data, you should see a result like this:

Note that at the top of the page, you see "SSN is invalid." Look at the URL in the address bar. You can see that this form has already been submitted and sent back to us, the previous values intact.
This has been a big tutorial! We have covered a lot of ground. Hopefully, you should now understand all the basics of HTML form processing with 4D. You've also learned a few more things, like working with 4D's Debugger. We will build upon all of this in subsequent tutorials in this series.