########################################################## # GDIdb demo script (c) 1998 Global Data Industries # # In this basic example, the contents of the spreadsheet # is merged with the site html using html table tags, # producing a table similar to the spreadsheet itself. ########################################################## ########################################################## # declare variable used by script &defvar(?name?) ########################################################## # Print the information screen &cls &print("Foodstore Demo Script") &print("---------------------------------") ########################################################## # get the name of the person running the script &input(?name?,"Please enter your name") ########################################################## # Declare the ODBC datasource &datasource("Driver={Microsoft Excel Driver (*.xls)};DBQ=foodstore.xls") ########################################################## # generate html &print("Generating HTML...") &html("index.html") { The Essential Programmer's Online Foodstore


The Essential Programmer's
Online Foodstore


Here at The Essential Programmer's Online Foodstore, we know a serious coding session requires full and professional support. That's why we've given you that support. Where you want it. Online. When you want it. 24 Hours a day. Every day. (Unless we're at the beach)

The Essential Programmer's Online Foodstore. More than just a luxury, we DARE you to try programming without our URL in your bookmarks!


Site updated # only include user's name if they actually bothered to enter it! &if("",ne,"?name?") { by ?name? } at ?gdidbtime? on ?gdidbdate.dn? ?gdidbdate?.




Price list:
# loop through each row of the recordset, turning the spreadsheet # table into a HTML table &getdata("SELECT * FROM sheet") { }
Item Stock Cost Per VAT Delivery Total
?Item? ?Stock? £?Cost? ?Per? £?VAT? £?Delivery? £?Total?
} ########################################################## # print closing information &cls &print("Demo web site HTML generation complete! Click the Preview HTML button to see the results.") &print &print # END OF SCRIPT