<## lastfirst.hts will PRE-pend newest record to data file ##> <## Alanr@alanr.com - http://alanr.com/ ##> <## Last edited Februarty, 1998 ##> <######################### Configuration #######################> <## Please remove all references to alanr.com before installation and adjust configuration variables and html code for your own purposes. ##> <## note:- You must name your own smtp server here. ##> <## note:- enter your email address here.##> <## set time variables for easy reading ##> <######################### /Configuration ######################> <################ HTML STUFF ##############> HTSWorks! Example Applet - puts new records at TOP of data file.
HTSWorks! Example Applet - puts new records at TOP of data file.


<################ /HTML STUFF ##############> <################ Applet demo management stuff ################> <## To create data file, run first time with "+seed" as arg2 ##> Data file has been cleared and initialized.

Return to Form

<######################### If first pass through applet, display form: #######> Enter something in each field, then press SUBMIT to see the data file.

field1: field2:
Visitor to app - &[myurl]
<######################### If Second pass through applet: #######> <########## Here's the code you're looking for. #################> <## This procedure will PRE-pend new data to the TOP of the data file. ##> <## This export routine saves new values to temp file.##> <## This import routine reads old data from data file.##> <## export old data as it is imported ##> <## the next 3 lines are redundant : ##> <## remove old file, rename temp file to old filename, remove temp file ##> <################## PRE-pending is done. #############> <## Now display results ##> Data is displayed in current record sequence:

record # = " | | " <--- most recent - note the time submitted


<## standard applet footer code ##>
Return to Form

Remove all data and initialize new file.

View / Save Source Code

HTSWorks! Sample Applets Page