subroutine IHello
include wbp w3include
* Get the User's name
call w3HtmlInit('simple', "")
call w3HtmlHeader('','') ;* Start the page
call w3HtmlFormBeg("","") ;* Begin a form
call w3Print("Enter your name: ")
call w3HtmlText('Name','','') ;* Prompt for "Name"
call w3HtmlSubmit('','OK','') ;* Add a submit button
call w3HtmlFormEnd ;* End the form
call w3HtmlFooter('','') ;* End the page
call w3Input(err,300,'') ;* Wait 5 minutes for answer
if err # w3_OK then return ;* Timed out, just exit
call w3GetVal(Name,"Name") ;* Get the user's name
* Get the user's Birth date
call w3HtmlInit('simple', "")
call w3HtmlHeader('','') ;* Start the page
call w3HtmlFormBeg("","") ;* Begin a form
call w3Print(Name:" Please enter your birth date: ")
call w3HtmlText('Bdate','','') ;* Prompt for "Bdate"
call w3HtmlSubmit('','OK','') ;* Add a submit button
call w3HtmlFormEnd ;* End the form
call w3HtmlFooter('','') ;* End the page
call w3Input(err,300,'') ;* Wait 5 minutes for answer
if err # w3_OK then return ;* Timed out, just exit
call w3GetVal(dob,"Bdate") ;* Get the user's DOB
* Tell the user how old he or she is
call w3HtmlInit('simple', "")
call w3HtmlHeader('','') ;* Start the page
days = date()-iconv(dob,'d')
call w3Print(Name:", you are ":days:" days old. (Yikes!)")
call w3HtmlFormBeg("","")
call w3HtmlSubmit('','OK','')
call w3HtmlFormEnd
call w3HtmlFooter('','') ;* End the page
call w3Input(err,300,'') ;* Wait 5 minutes for answer
* And we're done
return