This tutorial will give you a fast look what you can do with WhizBase. I expect you already know how to work with HTML at least, and that you understand the basics of the internet and how the internet works.
WhizBase is a server-side scripting language, which uses simple English words for its commands. WhizBase files regularly have .wbsp extension, but it also can have .ic, .sr, .inc and other less likely.
The syntax of WhizBase is directly embedded in HTML code, for example if you want to show the current date you use:
Every WhizBase file is interpreted first then sent back to the browser, so this code will not show any WhizBase code in the source code of the page.
Conditional Programming
As with most server-side scripting languages, WhizBase supports conditional programming, you can write IF statements and switch case statements in WhizBase. Here is the basic syntax and examples:
$WBCASE[,|$WBFN[WEEKDAYN]|=1,=2,=3,=4,=5,=6,=7|Today is Sunday, Today is Monday, Today is Tuesday, Today is Wednesday, Today is Thursday, Today is Friday, Today is Saturday|Today is unknown!]
One common reason to use server-side programming on sites is to collect data from the visitors. To collect some data from the user we will use a simple HTML Form:
A very powerful tool that is common on websites is a contact us form. The form can simply send an email by WhizBase, passing the subject, description and client's email.
This code will show all the data in the DB viewed in 20 records in a page with a navigator automatically generated for easier surfing.
Writing files
Finally, how to write files using WhizBase?
You have a lot of ways to write files in WhizBase, for example you can write ini files or txt files. I will show you the simplest way I have found:
[FormFields]wb_destination=today_is.txtwb_redirect=today_is.txt<!--WB_BeginTemplate-->Today is $WBFN[DATE]
When you open this file you will find today's date.
What is next
WhizBase can do a lot more than my examples have shown; you can work with sessions, arrays, variables, make complex calculations, update/delete/add records in any DB, sending sms's or mails to mailing lists and other features.
Comments (0)