# pring http header # decode params # if required params are not present # print explanation with link to sign-up page # exit # open database file for r/w access # get lock on that file # read current contents # if userid from form exists in database # close file # print explanation with link to sign-up page # exit # print new entry fields to database file # close file # print confirmation message