<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8430794678869775075</id><updated>2011-12-13T08:34:09.191+01:00</updated><category term='confirmation email'/><category term='AJAX'/><category term='subroutine'/><category term='Registration'/><category term='101 tutorial'/><category term='XHTML'/><category term='Security'/><category term='pager'/><category term='Password'/><category term='whizbase'/><category term='ICQ'/><title type='text'>WhizBase - Easy Scripting Language</title><subtitle type='html'>Publish your databases on the intranet or Internet as easy as 1-2-3 by &lt;a href="http://www.whizbase.com"&gt;WhizBase&lt;/a&gt;</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-299701023297740868</id><published>2011-05-25T10:22:00.000+02:00</published><updated>2011-05-25T10:22:09.241+02:00</updated><title type='text'>WhizBase: Sending an email with embedded images using WhizBa...</title><content type='html'>&lt;a href="http://blog.whizbase.com/2011/05/sending-email-with-embedded-images.html?spref=bl"&gt;WhizBase: Sending an email with embedded images using WhizBa...&lt;/a&gt;: "WhizBase has a built-in functions for sending a rich-text (HTML) emails. In your email you can easily include an absolute URL to any image a..." This is another post of Faik&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-299701023297740868?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blog.whizbase.com/2011/05/sending-email-with-embedded-images.html?spref=bl' title='WhizBase: Sending an email with embedded images using WhizBa...'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/299701023297740868/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/05/whizbase-sending-email-with-embedded.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/299701023297740868'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/299701023297740868'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/05/whizbase-sending-email-with-embedded.html' title='WhizBase: Sending an email with embedded images using WhizBa...'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-2426432542618244390</id><published>2011-05-25T10:09:00.000+02:00</published><updated>2011-05-25T10:09:39.526+02:00</updated><title type='text'>How to collect data from web visitors and save them in your database</title><content type='html'>The creator of WhizBase Faik Djikic have written a very good article today, this is a link to it: &lt;br /&gt;
&lt;blockquote&gt;"It is very easy to make data collecting web application using the  WhizBase. We will do it using only two WBSP files - one containing the  form (form.htm) and the other that saves received data into the database  (add.wbsp). &lt;a href="http://blog.whizbase.com/2011/05/how-to-collect-data-from-web-visitors.html"&gt;read more&lt;/a&gt; "&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-2426432542618244390?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blog.whizbase.com/2011/05/how-to-collect-data-from-web-visitors.html' title='How to collect data from web visitors and save them in your database'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/2426432542618244390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/05/how-to-collect-data-from-web-visitors.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/2426432542618244390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/2426432542618244390'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/05/how-to-collect-data-from-web-visitors.html' title='How to collect data from web visitors and save them in your database'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-6264426732819994295</id><published>2011-03-21T11:09:00.000+01:00</published><updated>2011-03-21T11:09:33.740+01:00</updated><title type='text'>Simple shopping cart with AJAX and WB</title><content type='html'>&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;This simple code is a shopping cart ready to implement on your site. AJAX and WhizB&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="line-height: 18px;"&gt;ase is combined to&amp;nbsp;empower&amp;nbsp;this powerful tool.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 13px; line-height: 18px;"&gt;For download please go to&amp;nbsp;&lt;a href="http://sourceforge.net/projects/shoppingcartwb/"&gt;http://sourceforge.net/projects/shoppingcartwb/&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-6264426732819994295?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://sourceforge.net/projects/shoppingcartwb/' title='Simple shopping cart with AJAX and WB'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/6264426732819994295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/03/simple-shopping-cart-with-ajax-and-wb.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/6264426732819994295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/6264426732819994295'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/03/simple-shopping-cart-with-ajax-and-wb.html' title='Simple shopping cart with AJAX and WB'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-8162806156878617711</id><published>2011-03-17T13:01:00.000+01:00</published><updated>2011-03-17T13:01:23.153+01:00</updated><title type='text'>You just finished building the perfect database for use as a web-app, if only you knew how to write a web-app. What do you do?</title><content type='html'>&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;Well, writing a web application does not have to be complicated and definitely does not have to take months of programming. With WhizBase it takes just two steps to make your database "airborne".&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;a href="http://blog.whizbase.com/2011/03/you-just-finished-building-perfect.html"&gt;more&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-8162806156878617711?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://blog.whizbase.com/2011/03/you-just-finished-building-perfect.html' title='You just finished building the perfect database for use as a web-app, if only you knew how to write a web-app. What do you do?'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/8162806156878617711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/03/you-just-finished-building-perfect.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/8162806156878617711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/8162806156878617711'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/03/you-just-finished-building-perfect.html' title='You just finished building the perfect database for use as a web-app, if only you knew how to write a web-app. What do you do?'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-5141442479191176886</id><published>2011-02-23T10:24:00.000+01:00</published><updated>2011-02-23T10:24:52.809+01:00</updated><title type='text'>Google Keyword Position by WhizBase</title><content type='html'>&lt;span class="Apple-style-span" style="color: #555555; font-family: sans-serif; font-size: 13px; line-height: 18px;"&gt;This simple application will look for your site in Google's search listing for some keyword in first 10 to 1000 positions, if you are found you will be notified with the position. For more information go to&amp;nbsp;&lt;a href="http://www.whizbase.com/" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0077aa; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;www.whizbase.com&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
For download please go to&amp;nbsp;&lt;a href="http://sourceforge.net/projects/googlekeywordwb/"&gt;http://sourceforge.net/projects/googlekeywordwb/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-5141442479191176886?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://sourceforge.net/projects/googlekeywordwb/' title='Google Keyword Position by WhizBase'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/5141442479191176886/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/google-keyword-position-by-whizbase.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/5141442479191176886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/5141442479191176886'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/google-keyword-position-by-whizbase.html' title='Google Keyword Position by WhizBase'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-1359420837816080336</id><published>2011-02-22T09:01:00.001+01:00</published><updated>2011-02-22T09:04:14.239+01:00</updated><title type='text'>Create HTML bar charts with WhizBase</title><content type='html'>&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;a href="http://www.experts-exchange.com/ARTH_5123186.html" style="color: #777777; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" target="_blank"&gt;http://www.experts-exchan&lt;wbr style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/wbr&gt;ge.com/ART&lt;wbr style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/wbr&gt;H_5123186.&lt;wbr style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/wbr&gt;html&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;A bar chart &amp;nbsp;is a chart with rectangular bars with lengths proportional to the values that they represent. The bars in this tutorial will be plotted horizontally. I will use WhizBase and HTML only. No need for any graphics or flash.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Creating the library&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;I will first begin with making a library of subroutines so I can call any subroutine to do me a job in any time in my code. Subroutines are something similar to custom functions in other programming languages. You can create any number of subroutines as you want, and they will not be processed until you call it in the code.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;I will create five subroutines, one will be to initialize the width, the rest are to add a column, &amp;nbsp;to calculate the percentage, to calculate the width values and to draw the graph (bar chart).&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;First the initialization subroutine:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #333333; font-family: monospace; font-size: 12px; white-space: pre;"&gt;&amp;lt;!--wb_beginsub_init--&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px;"&gt;$wbif[$wbgetv[w]&amp;gt;99|$wbsetv[width|$wbgetv[w]]|$wbsetv[width|100]]
&amp;lt;!--WB_EndSub--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;Before calling this subroutine I will set a variable 'w', if it is less than 99 or it is not sat I will set it to 100. Else I will take my variable value and set it in variable 'width'. This step is nessecery so we have always a default maximum width for the columns. Setting 'w' is not necessary.

Line 1 and line 3 are the start and the end of the subroutine. After beginsub 'init' is the name of the subroutine. Everything in between will not be rendered until you call the subroutine. Subroutines can call also subroutines in it self.

Now I will need a subroutine to add a new column. I want my graph to be dynamic so I can use it to unlimited number of comparetions.&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--wb_beginsub_addColumn--&amp;gt;
$WBAADD[headers|$wbgetv[hN]|F]
$WBAADD[barVals|$wbgetv[bV]|F]
 $wbsetv[sum|$wbcalc[$wbgetv[sum] + $wbgetv[bV]]]   
 $WBAADD[colorBars|$wbgetv[cB]|F] 
&amp;lt;!--WB_EndSub--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;When adding a new column (bar) I need to specify 3 elements, the name of that bar, it's color and value. So I need to set 3 variables before calling this subroutines, 'hN' for name, 'bV' for value and 'cB' for color.

In the subroutine I am adding the bar name to an array named as 'headers ', the values to an array named as 'barVals' and the color to 'colorBars' array. I also need to sum all values because I will needed it later.&amp;nbsp;

In WhizBase if you set a value to undefined variable or array it will define it automatically, so you do not need to worry about memory allocations and errors for undefined variables.

Every bar has a value which is a part of the sum of all values. To unify the values I need to get the percentage of these values to the total sum of all. 'calcPercents' will do the calculations I need.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--wb_beginsub_calcPercents--&amp;gt;
$wbsetv[numBars|$WBALEN[barVals]]
$wbsetv[i|0]
$wbwhile[$wbgetv[i]&amp;lt;$wbgetv[numBars]|
$WBAADD[barPerc|$wbformat$wbcalc[($wbgetv[barVals($wbgetv[i])]/$wbgetv[sum])*100]|#]|F]
$wbsetv[i|$wbcalc[$wbgetv[i]+1]]
]
&amp;lt;!--WB_EndSub--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;Now if you do not like mathematics you have a problem. I will need number of the bars to calculate all the percentages in a loop. The calculated value is added to 'barPerc' array. The formula in logic terms are:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333;"&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;interger of( (Bar value devided by total) multiply with 100)&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;I will not explain more how I got the percentage value it is pure mathematics.
'calcWidthVals' subroutine is used to calculate the width of every bar in HTML so I can draw the bars.&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--wb_beginsub_calcWidthVals--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;$wbsetv[numBars|$WBALEN[barVals]]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;$wbsetv[i|0]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;$wbwhile[$wbgetv[i]&amp;lt;$wbgetv[numBars]|&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;$WBAADD[widthVals|$wbcalc[abs(($wbgetv[barPerc($wbgetv[i])]/$wbgetv[width])*100)]|F]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;$wbsetv[i|$wbcalc[$wbgetv[i]+1]]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--WB_EndSub--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;Again by looping through all bar percentages I will get the width by this formula:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="font-family: Arial, Helvetica, sans-serif; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-4" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span"&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-6" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;Absolute of((bar percentage devided by maximum width) multiply with 100)&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-6" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-6" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-6" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;I am using absolute values here because in HTML I can not use negative values.
Finally I have just one subroutine to create, it is 'drawGraph', this one will draw the bars in HTML.&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-6" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-6" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-6" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px;"&gt;&amp;lt;!--wb_beginsub_drawGraph--&amp;gt;
 $wbsub[calcPercents]
 $wbsub[calcWidthVals]
 $wbsetv[numBars|$WBALEN[barVals]]
 &amp;lt;table cellpadding="0" cellspacing="0" border="0"&amp;gt;
 $wbsetv[i|0]
 $wbwhile[$wbgetv[i]&amp;lt;$wbgetv[numBars]|
  &amp;lt;tr&amp;gt;
  &amp;lt;td class="$wbgetv[cellClassName]"&amp;gt;
  $wbgetv[headers($wbgetv[i])]&amp;lt;/td&amp;gt;
  &amp;lt;td align="right" width="$wbcalc[$wbgetv[width]/2]"&amp;gt;
  &amp;lt;table cellpadding="0" cellspacing="0" width="$wbif[$wbgetv[barVals($wbgetv[i])]&amp;lt;0|$wbgetv[widthVals($wbgetv[i])]|0]%" border="0"&amp;gt;
  &amp;lt;tr height="20"&amp;gt;&amp;lt;td width="100%" bgcolor="$wbgetv[colorBars($wbgetv[i])]"&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
  &amp;lt;/table&amp;gt;
  &amp;lt;/td&amp;gt;
  &amp;lt;td align="left" width="$wbcalc[$wbgetv[width]/2]"&amp;gt;
  &amp;lt;table cellpadding="0" cellspacing="0" width="$wbif[$wbgetv[barVals($wbgetv[i])]&amp;gt;0|$wbgetv[widthVals($wbgetv[i])]|0]%" border="0"&amp;gt;
  &amp;lt;tr height="20"&amp;gt;&amp;lt;td width="100%" bgcolor="$wbgetv[colorBars($wbgetv[i])]"&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;
  &amp;lt;/table&amp;gt;
  &amp;lt;/td&amp;gt;
  &amp;lt;/tr&amp;gt;
  $wbsetv[i|$wbcalc[$wbgetv[i]+1]]
 ]&amp;lt;/table&amp;gt;
&amp;lt;!--WB_EndSub--&amp;gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;This subroutine does most of the job for us, in it I am calling the other subroutines. The only variable I can use if I want is 'cellClassName' which will hold the cell class name for CSS. You can skip this variable, it is just for formatting.&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;In this subroutine I am calculating the percentages by 'calcPercents', calculating bar widths by 'calcWidthVals' and counting how many bars do I have. Now I will create a table and loop the rows to create a row for every bar.&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;As bar graphs can have negative values I will use a two side bars view, the left ones are less than zero and the right ones are above zero. I am making a table with two cells, every cell will have an IF statement to check if the value is less than zero, this will show every row in its proper place.&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;In this table I am coloring the cell background and manipilating the cell width to show a presentation of the bar.&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;That will be all for the library. Just save this code as 'graph.ic'.&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;#* Initialization width *#&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--wb_beginsub_init--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;$wbif[$wbgetv[w]&amp;gt;99|$wbsetv[width|$wbgetv[w]]|$wbsetv[width|100]]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--WB_EndSub--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;#*&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;nbsp;&amp;nbsp;This subroutine adds a new values to the graphic&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;nbsp;&amp;nbsp;"hN" This is the name of the column (string type)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;nbsp;&amp;nbsp;"bV" This is a number that specifies the value of the bar&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;nbsp;&amp;nbsp;"cB" This is an string that specifies the color of the bar&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;*#&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--wb_beginsub_addColumn--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$WBAADD[headers|$wbgetv[hN]|F]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$WBAADD[barVals|$wbgetv[bV]|F]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$wbsetv[sum|$wbcalc[$wbgetv[sum] + $wbgetv[bV]]] &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$WBAADD[colorBars|$wbgetv[cB]|F]&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--WB_EndSub--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;#* This subroutine calculates the percents of the total *#&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--wb_beginsub_calcPercents--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$wbsetv[numBars|$WBALEN[barVals]]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$wbsetv[i|0]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$wbwhile[$wbgetv[i]&amp;lt;$wbgetv[numBars]|&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$WBAADD[barPerc|$wbformat[$wbcalc[($wbgetv[barVals($wbgetv[i])]/$wbgetv[sum])*100]|#]|F]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$wbsetv[i|$wbcalc[$wbgetv[i]+1]]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--WB_EndSub--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;#* This subroutine calculates the width values *#&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--wb_beginsub_calcWidthVals--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$wbsetv[numBars|$WBALEN[barVals]]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$wbsetv[i|0]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$wbwhile[$wbgetv[i]&amp;lt;$wbgetv[numBars]|&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$WBAADD[widthVals|$wbcalc[abs(($wbgetv[barPerc($wbgetv[i])]/$wbgetv[width])*100)]|F]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$wbsetv[i|$wbcalc[$wbgetv[i]+1]]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--WB_EndSub--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;#*&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;This subroutine draws the graph&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;"cellClassName" a css class name for easier formatting&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;*#&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--wb_beginsub_drawGraph--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$wbsub[calcPercents]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$wbsub[calcWidthVals]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$wbsetv[numBars|$WBALEN[barVals]]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;&amp;lt;table cellpadding="0" cellspacing="0" border="0"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$wbsetv[i|0]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;$wbwhile[$wbgetv[i]&amp;lt;$wbgetv[numBars]|&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;td class="$wbgetv[cellClassName]"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$wbgetv[headers($wbgetv[i])]&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;td align="right" width="$wbcalc[$wbgetv[width]/2]"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;table cellpadding="0" cellspacing="0" width="$wbif[$wbgetv[barVals($wbgetv[i])]&amp;lt;0|$wbgetv[widthVals($wbgetv[i])]|0]%" border="0"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;tr height="20"&amp;gt;&amp;lt;td width="100%" bgcolor="$wbgetv[colorBars($wbgetv[i])]"&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;td align="left" width="$wbcalc[$wbgetv[width]/2]"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;table cellpadding="0" cellspacing="0" width="$wbif[$wbgetv[barVals($wbgetv[i])]&amp;gt;0|$wbgetv[widthVals($wbgetv[i])]|0]%" border="0"&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;tr height="20"&amp;gt;&amp;lt;td width="100%" bgcolor="$wbgetv[colorBars($wbgetv[i])]"&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt;  &lt;/span&gt;$wbsetv[i|$wbcalc[$wbgetv[i]+1]]&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px;"&gt;&lt;span class="Apple-tab-span" style="white-space: pre;"&gt; &lt;/span&gt;]&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;!--WB_EndSub--&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Creating the main file&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/b&gt;
I will create my main file, I am naming it as 'default.wbsp', in it I do not have a lot to do, in general these are steps I need:
1. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Include the bar chart library&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;2. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Initialize the maximum width of a bar&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;3. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Add all the bars ( name, color, value)&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;4. &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Finally draw the graph


This is the code for all above:&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;[FormFields]
wb_command=r
WB_showlogo=F
&amp;lt;!--WB_BeginTemplate--&amp;gt;
$wbrinc[graph.ic]
$wbsetv[w|100]$wbsub[init]
$wbsetv[hN|Column 1]$wbsetv[bV|25,2]$wbsetv[cB|#CCCCCC]$wbsub[addColumn]
$wbsetv[hN|Column 2]$wbsetv[bV|-25,2]$wbsetv[cB|#AAAAAA]$wbsub[addColumn]
$wbsetv[hN|Column 3]$wbsetv[bV|100,32]$wbsetv[cB|#999999]$wbsub[addColumn]
$wbsetv[hN|Column 4]$wbsetv[bV|88,236]$wbsetv[cB|#777777]$wbsub[addColumn]
$wbsetv[hN|Column 5]$wbsetv[bV|11,236]$wbsetv[cB|#555555]$wbsub[addColumn]

&amp;lt;html&amp;gt; 
&amp;lt;head&amp;gt; 
&amp;lt;title&amp;gt;Test graphs&amp;lt;/title&amp;gt; 
&amp;lt;style&amp;gt; 
&amp;lt;!-- 
.cell_header { 
    font-family: "Arial Narrow"; 
    font-size: 12px; 
    font-style: normal; 
    line-height: normal; 
    font-weight: bold; 
    font-variant: normal; 
    text-transform: uppercase; 
    color: #E0E0E0; 
    text-decoration: none; 
    background-color: #4E4E4E; 
}
--&amp;gt; 
&amp;lt;/style&amp;gt; 
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;$wbsetv[cellClassName|icon_links_off]$wbsub[drawGraph]&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-7" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4533-1" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-1359420837816080336?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.experts-exchange.com/Programming/Languages/Scripting/A_4533-Create-HTML-bar-charts-with-WhizBase.html' title='Create HTML bar charts with WhizBase'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/1359420837816080336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/create-html-bar-charts-with-whizbase.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/1359420837816080336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/1359420837816080336'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/create-html-bar-charts-with-whizbase.html' title='Create HTML bar charts with WhizBase'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-3400257652613953136</id><published>2011-02-21T14:45:00.000+01:00</published><updated>2011-02-21T14:45:04.680+01:00</updated><title type='text'>What is WhizBase?</title><content type='html'>&lt;div class="MsoNormal"&gt;&lt;span style="mso-fareast-language: BS-LATN-BA; mso-font-kerning: 18.0pt;"&gt;WhizBase is a fast and simple scripting langauge to enhance your HTML webpage with dynamic content. WhizBase can do anything a website need, showing database content, uplaoding files, password protected logins, adding, deleting and updating database records. It has also all complex commands like conditional statements, loops, math functions and more than 200 other functions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="mso-fareast-language: BS-LATN-BA; mso-font-kerning: 18.0pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="mso-fareast-language: BS-LATN-BA; mso-font-kerning: 18.0pt;"&gt;WhizBase is not a programming language, it is simpler than even JavaScript, no programming skills are required to use it. WhizBase can be used with any WYSIWYG editor without the need to look into your HTML code. All you need to know is how to create a webpage and a MS Access database or even MS Excel sheet. Adding WhizBase commands in your WYSIWYG editor as any other text will be enough to show dynamic content on your webpage.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="mso-fareast-language: BS-LATN-BA; mso-font-kerning: 18.0pt;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="mso-fareast-language: BS-LATN-BA; mso-font-kerning: 18.0pt;"&gt;If you have a database and you want it to be acceced&lt;span style="mso-spacerun: yes;"&gt;&amp;nbsp; &lt;/span&gt;by others through an office network, WhizBase can transform it to an intranet solution &lt;/span&gt;&lt;a href="http://www.techrepublic.com/blog/10things/10-reasons-to-turn-your-access-applications-into-web-based-applications/340" target="_blank"&gt;&lt;span style="color: #0a4899; font-family: &amp;quot;Georgia&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 10.0pt; line-height: 115%;"&gt;(here you can read more about benefits of turning your databases to intranet applications)&lt;/span&gt;&lt;/a&gt;&lt;span class="apple-style-span"&gt;&lt;span style="color: black; font-family: &amp;quot;Georgia&amp;quot;,&amp;quot;serif&amp;quot;; font-size: 13.5pt; line-height: 115%;"&gt;, &lt;/span&gt;&lt;span style="color: black;"&gt;PowerPack Wizards is a free tool distributed with WhizBase to do the job. No need for HTML or Database knowladge, transfer any database to an intranet application in seconds.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="color: black;"&gt;WhizBase also can be used to create simple and complex CMS powered web sites, simple and complex applications, Adobe flash and microsoft silverlight codes, dynamic generated javascript scripts and any text like script or code.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="color: black;"&gt;Your webpages created in WhizBase are Operating System indepented, you do not need to install it on every computer you use to view them. It gives pure HTML code as a result. All you need is to install WhizBase on any web server in your office or in the internet, and you can access your WhizBase application by internet or by LAN. WhizBase also can be used as a desktop or a network application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="color: black;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span class="apple-style-span"&gt;&lt;span style="color: black;"&gt;Your visitors do not need to download and install anything on their computers to be able to see WhizBase generated content, it is intrepreted scripting language, all the proccesing is done on the server-side.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-3400257652613953136?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/3400257652613953136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/what-is-whizbase.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/3400257652613953136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/3400257652613953136'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/what-is-whizbase.html' title='What is WhizBase?'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-4580245223687240283</id><published>2011-02-15T10:25:00.001+01:00</published><updated>2011-02-15T10:25:29.533+01:00</updated><title type='text'>HTML Horizontal Bar Chart Generator</title><content type='html'>&lt;span class="Apple-style-span" style="color: #555555; font-family: sans-serif; font-size: 13px; line-height: 18px;"&gt;Displaying tabular information in a graphical form is helpful for a visual representation of the data. HTML Horizontal Bar Chart generated using HTML Tables and WhizBase Server Pages.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #555555; font-family: sans-serif; font-size: 13px; line-height: 18px;"&gt;To download please visit:&amp;nbsp;&lt;a href="http://htmlhorizontalb.sourceforge.net/"&gt;http://htmlhorizontalb.sourceforge.net/&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-4580245223687240283?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/4580245223687240283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/html-horizontal-bar-chart-generator.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/4580245223687240283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/4580245223687240283'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/html-horizontal-bar-chart-generator.html' title='HTML Horizontal Bar Chart Generator'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-2951858137054648110</id><published>2011-02-15T09:41:00.000+01:00</published><updated>2011-02-15T09:41:11.020+01:00</updated><title type='text'>Simple Address Book</title><content type='html'>&lt;span class="Apple-style-span" style="color: #555555; font-family: sans-serif; font-size: 13px; line-height: 18px;"&gt;This is a simple fast personal address book developed by WhizBase Server Pages.&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #555555; font-family: sans-serif; font-size: 13px; line-height: 18px;"&gt;To download this OpenSource &amp;nbsp;application&amp;nbsp;&lt;/span&gt;&lt;a href="http://wbaddress.sourceforge.net/"&gt;http://wbaddress.sourceforge.net/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-2951858137054648110?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://wbaddress.sourceforge.net/' title='Simple Address Book'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/2951858137054648110/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/simple-address-book.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/2951858137054648110'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/2951858137054648110'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/simple-address-book.html' title='Simple Address Book'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-332060595391151703</id><published>2011-02-15T09:36:00.001+01:00</published><updated>2011-02-15T09:41:29.523+01:00</updated><title type='text'>Access Database Web Administration Tool</title><content type='html'>&lt;span class="Apple-style-span" style="color: #555555; font-family: sans-serif; font-size: 13px; line-height: 18px;"&gt;If you need to publish your Access DB online, you do not need to make an interface anymore, just take this application, edit it a little bit and upload your Access DB. You will only need a WhizBase Server Pages Engine&amp;nbsp;&lt;a href="http://www.whizbase.com/" style="background-attachment: initial; background-clip: initial; background-color: transparent; background-image: initial; background-origin: initial; background-position: initial initial; background-repeat: initial initial; color: #0077aa; font-size: 13px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: none; outline-width: initial; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;"&gt;http://www.whizbase.com&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Download this opensource application at&amp;nbsp;&lt;a href="https://sourceforge.net/projects/accessdatabasea/"&gt;https://sourceforge.net/projects/accessdatabasea/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-332060595391151703?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='https://sourceforge.net/projects/accessdatabasea/' title='Access Database Web Administration Tool'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/332060595391151703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/access-database-web-administration-tool.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/332060595391151703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/332060595391151703'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/access-database-web-administration-tool.html' title='Access Database Web Administration Tool'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-1714721282302449031</id><published>2011-02-04T14:26:00.001+01:00</published><updated>2011-02-04T14:30:48.511+01:00</updated><title type='text'>Generate dynamic RTF (Rich Text Format) documents easily</title><content type='html'>&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;In this tutorial I will show you how to make RTFs with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;a href="http://www.experts-exchange.com/ARTH_5123186.html" style="color: #777777; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" target="_blank"&gt;http://www.experts-exchan&lt;wbr style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/wbr&gt;ge.com/ART&lt;wbr style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/wbr&gt;H_5123186.&lt;wbr style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/wbr&gt;html&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Create your document&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;First you need to make an RTF template, it is how the document will look like. I have created a file which lists the first name, last name, telephone, email and address in a table.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_bnfpJgKzxEQ/TUv98_hLOnI/AAAAAAAAA0A/sG8kL8fQfD8/s1600/rtf-word.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="217" src="http://4.bp.blogspot.com/_bnfpJgKzxEQ/TUv98_hLOnI/AAAAAAAAA0A/sG8kL8fQfD8/s400/rtf-word.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;As you can see the dynamic part will contain WhizBase code. &amp;nbsp;I have putted $wbf[fname], $wbf[lname], $wbf[email], $wbf[tel] and $wbf[address] in the cells I want to show dynamic data.&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;These placeholders will be replaced dynamically with data.&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;Now just save the document as RTF file. You go to "Save As" and save the file as "form.rtf".&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Create you database file&lt;/b&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;The database can be in any format, I will use Microsoft Access because it is the easiest for me. You can use MySQL, Oracle, MS SQL or even Microsoft Excel.&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;I will create a database file with one table "contacts", it will contain these 6 fields:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_bnfpJgKzxEQ/TUv-MjhBkYI/AAAAAAAAA0E/jMwHBffrvNk/s1600/access.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="253" src="http://2.bp.blogspot.com/_bnfpJgKzxEQ/TUv-MjhBkYI/AAAAAAAAA0E/jMwHBffrvNk/s400/access.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-1" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;ID – autonumaber and primary key
Fname – text
Lname – text
Email – text
Tel – text
Address – memo&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-1" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-1" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-1" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-1" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;Now save this file as "form.mdb"
I have inserted some records in this table.

&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Create WhizBase file&lt;/b&gt;
Finally we need a file which will be our webpage which takes the ID and gives us the RTF document. So we need to implement an input form for ID, and when submit is clicked then start downloading the new generated file.

First let's rename the file "form.rtf" to "form.ic", "ic" is the extension for included files in WhizBase by the function $wbrinc.&amp;nbsp;

Now create an HTML file with this code:&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-1" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span class="Apple-style-span" style="font-size: 12px; white-space: normal;"&gt;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;form action='form.wbsp' method='post'&amp;gt;Insert ID: &amp;lt;input type='text' name='wbf_id' /&amp;gt;&amp;lt;input type='submit' value='Export file' /&amp;gt;&amp;lt;/form&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-1" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-1" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-2" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;form action="form.wbsp" method="post"&gt;&lt;/form&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-2" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-2" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;This is a very basic HTML form file, the only thing you must not forget is the name of the text field, it will be wbf_id, which I have already explained in previous tutorials. Save this file as "default.wbsp".

Now we create another WhizBase file where we query the DB and include the RTF template file.&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-2" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-2" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span"&gt;&lt;span class="Apple-style-span"&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-3" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-3" style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 12px;"&gt;[FormFields]
WB_BaseName=form.mdb
WB_Command=Q
WB_RcdSet=contacts
WB_ShowLogo=F
wb_contenttype=application/msword
&amp;lt;!--WB_BeginTemplate--&amp;gt;
$wbrinc[form.ic]&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-3" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-3" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-3" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;As you can see nothing new, we are simply querying the DB and including the template which have the placeholders which will be replaced with data. The only important and new thing is the line:&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-3" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-3" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-3" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-4" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;wb_contenttype=application/msword&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-4" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-4" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-4421-4" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;Here we say to the browser that this documents type is not HTML so do not render it, we say it is MS WORD &amp;nbsp;application type, so any popular browser will just download it to your computer.

And you have now a ready script to make RTF reports easily.

For more information please visit my member profile at&amp;nbsp;&lt;a href="http://www.experts-exchange.com/M_5123186.html" style="color: #777777; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" target="_blank"&gt;http://www.experts-exchan&lt;wbr style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/wbr&gt;ge.com/M_5&lt;wbr style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/wbr&gt;123186.htm&lt;wbr style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/wbr&gt;l&lt;/a&gt;
Or visit the WhizBase official site at&amp;nbsp;&lt;a href="http://www.whizbase.com/" style="color: #777777; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" target="_blank"&gt;www.whizbase.com&lt;/a&gt;

NurAzije is a PHP and WhizBase programmer, who at the time of article publication has been working in partnership with WhizBase company on several projects and very recently as an employee.&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-1714721282302449031?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.experts-exchange.com/Programming/Languages/Scripting/A_4421-Generate-dynamic-RTF-Rich-Text-Format-documents-easily.html' title='Generate dynamic RTF (Rich Text Format) documents easily'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/1714721282302449031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/generate-dynamic-rtf-rich-text-format.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/1714721282302449031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/1714721282302449031'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/02/generate-dynamic-rtf-rich-text-format.html' title='Generate dynamic RTF (Rich Text Format) documents easily'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_bnfpJgKzxEQ/TUv98_hLOnI/AAAAAAAAA0A/sG8kL8fQfD8/s72-c/rtf-word.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-6819591173153421630</id><published>2011-01-24T10:55:00.000+01:00</published><updated>2011-01-24T10:55:16.634+01:00</updated><title type='text'>How to make a database-driven frontpage slideshow</title><content type='html'>&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website, &amp;nbsp;magazine or online news has one on their site, and even some e-commerce sites have one.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Today you can use sliders with Joomla, WordPress or Drupal. But the problem I had when I used one of the ready-made components you can download is that it is not customizable. Yes, you can change the look and feel, but you can not change the code. It is very complicated even for experienced developers.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Finally I decided to make one my own, which I believe is easier to manage and doesn't have 1000 options I do not need. The best part, though, is that I can upgrade it as I want when I need, just by adding a little more code.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Back-end section&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;My component is made of two parts. The first one is the back-end section which is the side the visitors do not see -- the administration part of the slider. We will need a simple database table which will contain the data. I will use an Access DB. I created a table with these fields:&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;id Autonumber - this is just for indexing and it will be the primary-key&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana;"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Verdana;"&gt;slideimg Text - this will contain the path to the picture&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;slidetitle Text - this will contain the title of the slide&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;slideurl Text - this will contain the URL destination when you click the slide&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;I saved this table as "slider" and the file as "cms.mdb".&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Then I created the administration interface. I used WhizBase for querying/editing the DB. Everything between #* and *# are comments so you can follow the code I used.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;[FormFields]&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_BaseName=cms.mdb #* the path to the DB file *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_RcdSet=slider #* the table name *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_MAXREC=20 #* show 20 records in every page in the navigation system *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_ORDER=id DESC #* order records by ID in Desc *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_Command=Q #* Query the table *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;!--WB_BeginTemplate--&amp;gt; #* Begin the visual part *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;"http://www.w3.org/TR/html4/loose.dtd"&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;title&amp;gt;Slider admin&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;h1&amp;gt;Add slides&amp;lt;h1&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;form action="addslider.wbsp" method="post" enctype="multipart/form-data"&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;#* for adding new slides we will submit our data to addslider.wbsp which we will create later. Do not forget to put enctype="multipart/form-data" because we are uploading files to the server. *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;Slide title: &amp;lt;input type="text" name="wbf_slidetitle" /&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;Slide URL: &amp;lt;input type="text" name="wbf_slideurl" /&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;Slide IMG: &amp;lt;input type="file" name="wbf_slideimg" /&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;input type="submit" value="Add slider" /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;#* You will notice that I am using wbf_ in the input names. It is a prefix I add to make WhizBase process the data I am sending and add it in the DB automatically. *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;hr /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;#* Here we list the result of the query we done in the start of this file *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;h1&amp;gt;All slides&amp;lt;h1&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;table width="100%" border="1" cellpadding="5" cellspacing="0" align="left"&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;tr&amp;gt;&amp;lt;td align="left" valign="top"&amp;gt;&amp;lt;b&amp;gt;Title&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align="left" valign="top"&amp;gt;&amp;lt;b&amp;gt;Thumb&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align="left" valign="top"&amp;gt;&amp;lt;b&amp;gt;URL&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td align="left" valign="top"&amp;gt;&amp;lt;b&amp;gt;Delete&amp;lt;/b&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;!--WB_BeginDetail--&amp;gt; #* this will go through every record and added in our table *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;td align="left" valign="top"&amp;gt;$wbf[slidetitle]&amp;lt;/td&amp;gt; #* $wbf is a function in WhizBase to show a field for a record *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;td align="left" valign="top"&amp;gt;&amp;lt;img src="$wbf[slideimg]" width="150" /&amp;gt;&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;td align="left" valign="top"&amp;gt;$wbf[slideurl]&amp;lt;/td&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;td align="left" valign="top"&amp;gt;&amp;lt;a href="delete.wbsp?wbf_id=$wbf[id]"&amp;gt;$wbf[id]&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt; #* to pass variables by GET method I am using the wbf_ prefix *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;!--WB_EndDetail--&amp;gt; #* this will end the records loop *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;center&amp;gt;$wbnavigator[]&amp;lt;/center&amp;gt; #* I am adding the navigation links, so we can navigate through big lists *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;This page will let me add or delete slides; save it as "slider.wbsp". Now let us see "addslider.wbsp":&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;[FormFields]&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_BaseName=cms.mdb&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_AllowMultipart=T #* Allow multipart data is set to True. Without this we can not upload files, because upload is False by default for security reasons *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_Command=A #* Add our parameters in the DB - we get them from the form with wbf_ prefixes *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_Redirect=slider.wbsp #* redirect us to the admin page again *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_RcdSet=slider&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;[Upload] #* This section is for upload information *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_Disallow=![jpg,gif,png,bmp] &amp;nbsp;#* Disallow everything but pictures *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_UploadDir=/images/ #* Upload pictures to images folder *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_BaseURL=/images/ #* Base path will be images folder *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_Overwrite=F #* Do not overwrite images, new images with same name will be given a new unique name automatically *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_MaxFSize=500000 #* Maximum size in bytes *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_UploadLog=upload.log #* write a log file upload.log *#&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;This is a pure WhizBase file which will upload the picture and add the data to the DB. It will check the size of the file, the file type, set the upload folder, filter all data from SQL injections and keep the files without being overwritten.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Now let us make the "delete.wbsp" file which deletes our slides.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;[FormFields]&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_BaseName=cms.mdb&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_RcdSet=slider&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_Command=D #* D is for delete, we have got the id in the link with prefix wbf_ *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_Redirect=slider.wbsp&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Now we have the administration ready. You can make a password protected folder and put the administration files in it, but do not forget to change the paths.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Front-end section&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;The second section is the front-end section which is the side the visitors see; it is the visual part of the slider. We will need some JavaScript and HTML code, with WhizBase for querying the DB.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;[FormFields]&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_BaseName=cms.mdb #* the path to the DB file *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_RcdSet=slider #* the table name *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_MAXREC=$all$ #* show all records in sliders we do not navigate *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_ORDER=id DESC #* order records by ID in Desc *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;WB_Command=Q #* Query the table *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;!--WB_BeginTemplate--&amp;gt; #* Begin the visual part *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;title&amp;gt;Frontpage slideshow&amp;lt;/title&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;var slides= new Array($wbp[RC]); #* $wbp[RC] will give the number of records count. We need the number of slides for JS array, we will fill the array with data in the looping section *#&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;body onload="initslider();"&amp;gt; #* to start the slider we make a JavaScript call on-load of body *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;div id="slider"&amp;gt;&amp;lt;/div&amp;gt; #* this will contain the slideshow *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;!--WB_BeginDetail--&amp;gt; #* I will list all the slides here, but I will not display them. This is good for SEO *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;script type="text/javascript"&amp;gt;slides[$wbp[RN]] = 'slide$wbf[id]';&amp;lt;/script&amp;gt; #* $wbp[RN] will give us the record number. We need the slide div id which will be slide+id *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;div id="slide$wbf[id]" style="display:nome;"&amp;gt; #* Use display:none; to hide the slide *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;a href="$wbf[slideurl]"&amp;gt;&amp;lt;img src="$wbf[slideimg]" alt="$wbf[slidetitle]" border="0" /&amp;gt;&amp;lt;/a&amp;gt; #* we make the content of every slide *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;!--WB_EndDetail--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;#* We need initslider(); function in JavaScript *#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;var start=0;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;function initslider(){&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;setTimeout("initslider()",500);&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;document.getElementById('slider').innerHTML = document.getElementById(slides[start]).innerHTML;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;nbsp;&amp;nbsp;if(start == $wbp[RC]-1)&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;nbsp;start = 0;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;start++;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;#* This function will take the content of the slide from a hidden div and set it in the slideshow div. It will launch itself every 500 miliseconds again and set the next slide in the slideshow div. We check also the slide number, and if it is equal to the number of all slides minus one, it will reset the slide number. &amp;nbsp;*#&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="background-color: #333333; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white; font-family: Verdana;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;With this file, named "default.wbsp", we have a custom made slideshow manager. You can now add more elements in the slide show, like thumbnail picture, description, slide types and timers.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;For more information email me at: NurAzije [at] Gmail [dot] com.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;NurAzije is a PHP and WhizBase programmer, who at the time of article publication is working in partnership with WhizBase on several projects.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-6819591173153421630?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/6819591173153421630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/01/how-to-make-database-driven-frontpage_24.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/6819591173153421630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/6819591173153421630'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/01/how-to-make-database-driven-frontpage_24.html' title='How to make a database-driven frontpage slideshow'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-4349130378550106584</id><published>2011-01-24T10:23:00.005+01:00</published><updated>2011-01-24T10:39:15.774+01:00</updated><title type='text'>Making a simple AJAX shopping cart</title><content type='html'>&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Making a simple AJAX shopping cart&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Today we have more advanced technology, faster, better and more fancy, we can make shopping carts on any site with no need to talk with cookies, let sessions do the storing and AJAX make the communication.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;In this tutorial I will show you how to make a Session/AJAX based shopping cart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;a href="http://www.whizbase.com/eng/?p=8" style="color: #777777; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" target="_blank"&gt;http://www.whizbase.com/e&lt;wbr style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/wbr&gt;ng/?p=8&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;The products page&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Every shopping site have a product page, and that page is where everything starts when you make a shopping. To add products to the shopping cart we need products, every product need an Unique ID. On this page we will also show the cart, we make sure when the visitor comes for the first time it will be empty. Every visit will be a unique shopping and that means a unique session. Sessions are temporary data files created on the server having some data about or from the visitor coming on the site. Every visitor have its own unique session. WhizBase manages sessions automatically, so you just work with session variables as you work with any other, no need to work with session files on the server.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;In this file which I will name as «default.wbsp» I will turn sessions to «True» because they are «False» by default. I will also need the AJAX script, the products listings and the shopping cart div.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Look at the code comments for more details:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style="background-color: #333333; font-family: Verdana; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white;"&gt;[FormFields]&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;WB_UseSessions=T&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* I am setting WB_UseSessions to True so I can use sessions with WhizBase *#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* I am checking if product1,product2 and product3 variables are not set and set a value of zero, that is how I know if the user is comming for the first time or not.*#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;$wbif["$wbgets[product1]"=""|$wbsets[product1|0|f]|]$wbif["$wbgets[product2]"=""|$wbsets[product2|0|f]|]$wbif["$wbgets[product3]"=""|$wbsets[product3|0|f]|]&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* I am using $wbgets[varname] to get a session variable, and $wbsets[varname€|value] to set a session variable *#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;script type="text/javascript"&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* I am making a showCart JavaScript/AJAx function, it creates an AJAX object and calls «showCart.wbsp» file to show the current status of the cart, the retrieved data is putted by innerHTML into «cartview» div *#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;function showCart()&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;if (window.XMLHttpRequest)&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;// code for IE7+, Firefox, Chrome, Opera, Safari&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp=new XMLHttpRequest();&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;// code for IE6, IE5&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp.onreadystatechange=function()&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;if (xmlhttp.readyState==4 &amp;amp;&amp;amp; xmlhttp.status==200)&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;document.getElementById("cartview").innerHTML=xmlhttp.responseText;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp.open("GET","showCart.wbsp?and="+Math.floor(Math.random()*99999999999),true);&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp.send();&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* addCart function in JavaScript will pass an ID and send it to addCart.wbsp which adds a new product in the cart. On responce we will refresh the cart view by calling showCart function*#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;function addCart(id)&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;if (window.XMLHttpRequest)&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{// code for IE7+, Firefox, Chrome, Opera, Safari&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp=new XMLHttpRequest();&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{// code for IE6, IE5&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp.onreadystatechange=function()&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;if (xmlhttp.readyState==4 &amp;amp;&amp;amp; xmlhttp.status==200)&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;showCart();&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp.open("GET","addCart.wbsp?id="+id+"&amp;amp;rand="+Math.floor(Math.random()*99999999999),true);&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp.send();&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* remove function in JavaScript will pass an ID and send it to removeCart.wbsp which removes one product passed from the cart. On responce we will refresh the cart view by calling showCart function  *#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;function remove(id)&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;if (window.XMLHttpRequest)&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{// code for IE7+, Firefox, Chrome, Opera, Safari&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp=new XMLHttpRequest();&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;else&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{// code for IE6, IE5&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp.onreadystatechange=function()&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;if (xmlhttp.readyState==4 &amp;amp;&amp;amp; xmlhttp.status==200)&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;showCart();&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp.open("GET","removeCart.wbsp?id="+id+"&amp;amp;rand="+Math.floor(Math.random()*99999999999),true);&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;xmlhttp.send();&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;body onload="showCart();"&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* OnLoad we will refresh the cart by showCart() function, this will update the cart div every time we refresh the page *#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* We list the products and every product have its own ID *#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;a href="javascript:void(0);" onclick="addCart(1);"&amp;gt;Product 1&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;a href="javascript:void(0);" onclick="addCart(2);"&amp;gt;Product 2&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;a href="javascript:void(0);" onclick="addCart(3);"&amp;gt;Product 3&amp;lt;/a&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;b&amp;gt;Cart content&amp;lt;/b&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* cartview is a div for holding cart data.*#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;div id="cartview"&amp;gt;Cart is empty!&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Save this code as default.wbsp.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Adding products in the cart&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;When we make shopping online, sometimes we want to buy more than one instance from a product, for example I want two T-Shirts. As a user I do not want to see a list in my cart like this: T-shirt,T-shirt,Shoes,choc&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;wbr style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;/wbr&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;olate. This will confuse me, so I am adding a counter for every product, so it will be 2x T-shirt, 1x Shoes, 1x chocolate. Keep that in mind. In the next file I am working on I will add data to the session. I will receve data by AJAX calls so I do not need any interface. I will need to check which product I will add and that is made by the sent ID.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;If an ID is sent I am adding one instance more, so if I have 4 items from product1 it will become 5 items.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;See the comments in the code for more details:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style="background-color: #333333; font-family: Verdana; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white;"&gt;[FormFields]&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;WB_UseSessions=T&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* I am turning the sessions to True *#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;$wbif["$wbv[id]"="1"|$WBSETS[product1|$WBCalc[$WBGETS[product1]+1]|f]|]&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;$wbif["$wbv[id]"="2"|$WBSETS[product2|$WBCalc[$WBGETS[product2]+1]|f]|]&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;$wbif["$wbv[id]"="3"|$WBSETS[product3|$WBCalc[$WBGETS[product3]+1]|f]|]&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* I have three cases in my example so I am hard-coding them. I check the ID variable sent by GET or POST by $WBV, if it is equal an ID I have I will set a value of the variable+1 using $WBCalc, $WBSets and $WBGets, if not do nothing *#&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;In more complex examples you can use loops and not hard-coding the code, this is only for tutorial purposes.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Save this code as addCart.wbsp.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Removing products from the cart&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;If I want to remove an item from the cart I want to remove one instance only not all the items. So as like adding here I am removing.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style="background-color: #333333; font-family: Verdana; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white;"&gt;[FormFields]&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;WB_UseSessions=T&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* I am turning the sessions to True *#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;$wbif["$wbv[id]"="1"|$WBSETS[product1|$WBCalc[$WBGETS[product1]-1]|f]|]&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;$wbif["$wbv[id]"="2"|$WBSETS[product2|$WBCalc[$WBGETS[product2]-1]|f]|]&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;$wbif["$wbv[id]"="3"|$WBSETS[product3|$WBCalc[$WBGETS[product3]-1]|f]|]&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* Removing is the same code as adding but the only different we will remove an item not adding it. *#&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Save this code as removeCart.wbsp.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;Show me my Cart&lt;/b&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" /&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;Finally we will make the showCart.wbsp file, it will just contain some HTML and WhizBase code for showing the cart content.&lt;/span&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 12px;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div style="background-color: #333333; font-family: Verdana; padding-bottom: 10px; padding-left: 10px; padding-right: 10px; padding-top: 10px;"&gt;&lt;span class="Apple-style-span" style="color: white;"&gt;[FormFields]&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;WB_UseSessions=T&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;#* I am turning the sessions to True *#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;There is:&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;br /&amp;gt;$wbgets[product1] X Product1 $wbif[$wbgets[product1]&amp;gt;0|(&amp;lt;a href="javascript:void(0);" onclick="remove(1);"&amp;gt;remove&amp;lt;/a&amp;gt;)|] #* we show the session variable containning number of items of the products and only if there is items then show the remove link also *#&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;br /&amp;gt;$wbgets[product2] X Product2 $wbif[$wbgets[product2]&amp;gt;0|(&amp;lt;a href="javascript:void(0);" onclick="remove(2);"&amp;gt;remove&amp;lt;/a&amp;gt;)|]&lt;/span&gt;&lt;br /&gt;
&lt;span class="Apple-style-span" style="color: white;"&gt;&amp;lt;br /&amp;gt;$wbgets[product3] X Product3 $wbif[$wbgets[product3]&amp;gt;0|(&amp;lt;a href="javascript:void(0);" onclick="remove(3);"&amp;gt;remove&amp;lt;/a&amp;gt;)|]&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;pre class="notpretty" id="codeSnippet30-3255-4" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: white;"&gt;&lt;span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;Save this code as showCart.wbsp.&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-3255-4" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;
&lt;/b&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-3255-4" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;&lt;b style="margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;What's next&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-3255-4" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;This is a very simple tutorial to show you how you can make a shopping cart using AJAX/WhizBase technologies. If you want more complex shopping carts you need to use loops and databases which can be also done with WhizBase and AJAX, if you are not familiar with WhizBase please read my previous articles.&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-3255-4" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;
&lt;/span&gt;&lt;/pre&gt;&lt;pre class="notpretty" id="codeSnippet30-3255-4" style="font-size: 12px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;"&gt;&lt;span class="Apple-style-span" style="color: #333333; font-family: Arial, Helvetica, sans-serif; white-space: normal;"&gt;&amp;nbsp;For more information email me at: NurAzije [at] Gmail [dot] com Or visit the WhizBase official site at&amp;nbsp;&lt;a href="http://www.whizbase.com/" style="color: #777777; cursor: pointer; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;" target="_blank"&gt;www.whizbase.com&lt;/a&gt;

NurAzije is a PHP and WhizBase programmer, who at the time of article publication is working in partnership with WhizBase on several projects.&lt;/span&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-4349130378550106584?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/4349130378550106584/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/01/how-to-make-database-driven-frontpage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/4349130378550106584'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/4349130378550106584'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2011/01/how-to-make-database-driven-frontpage.html' title='Making a simple AJAX shopping cart'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-8816494897445545268</id><published>2010-05-11T14:15:00.002+02:00</published><updated>2010-05-11T14:24:38.459+02:00</updated><title type='text'>Create a log-in system for registered users with WhizBase</title><content type='html'>This tutorial will discuss the log-in process using WhizBase. In this  article I assume you already know HTML. I will write the code using  WhizBase Server Pages, so you need to know some basics in WBSP (you  might look at some of my other articles about WhizBase).

In the  last article &lt;a rel="noindex nofollow" target="_blank" href="http://www.experts-exchange.com/articles/Programming/Languages/Scripting/Create-an-AJAX-supported-registration-form-with-WhizBase.html"&gt;"Create  an AJAX supported registration form with WhizBase"&lt;/a&gt; I have explained  how we can make a registration process, now when users register to your  site, you need to make them log-in to secured pages.

&lt;b&gt;The  Log-in Page&lt;/b&gt;
I will create a log-in page which is a simple HTML  code and save it as "login.ic", I will explain later why I did not save  it as HTML.

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
         &amp;lt;form action=&amp;quot;login.wbsp&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;&lt;br /&gt;
          Please enter your log-in information:&amp;lt;br /&amp;gt;&lt;br /&gt;
          Username &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;username&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
          Password &amp;lt;input type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
          &amp;lt;input type=&amp;quot;submit&amp;quot; value=&amp;quot;Login&amp;quot; /&amp;gt;&lt;br /&gt;
          &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;
&lt;/div&gt;

I will not explain this code, it is a simple HTML code with to fields  and a submit button.

&lt;b&gt;The secured page&lt;/b&gt;
I will create a  page where its data must not be seen by non-registered users, I will  save it as "secured.ic", again I am saving it with IC extension, I will  explain that later.

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
Hello $wbgets[username],&amp;lt;br /&amp;gt;&lt;br /&gt;
you are logged in!&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;
&lt;/div&gt;

In this code we have just one new function, it is the $wbgets[] which is  a function to get the session variable "username" where the username is  stored.

&lt;b&gt;What to show?&lt;/b&gt;
This is my main page where I  will check if the visitor is logged in or not, if yes I will show him  the secured page, if not I will show the log-in form. Here we will  discuss sessions in WhizBase. Please use WhizBase 6, because sessions  are not used in earlier versions.

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
WB_UseSessions=T &lt;br /&gt;
#* Use sessions in this page *#&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;br /&gt;
$wbif[&amp;quot;$wbgets[logged]&amp;quot;=&amp;quot;1&amp;quot;| #* check if we have a session variable logged and have a value 1 *#&lt;br /&gt;
$wbrinc[secured.ic] #* if yes, show the secured page, the user is logged in *#&lt;br /&gt;
|&lt;br /&gt;
$wbrinc[login.ic] #* if not, show the log-in form, the user is not logged in *#&lt;br /&gt;
]
&lt;/div&gt;

As you can see from comments in the code I have turned the sessions on  by putting WB_UseSessions=T in the Form-Fields section, so WhizBase will  start processing session data. Sessions are not included in WhizBase by  default, so you need to turn it on in every page you use them in.

Next,  I am testing if there is a session variable "logged" with value "1" by  an if statement, this variable will be set in the file "login.wbsp", I  will explain that in the next section. Now just consider that we have a  session variable "logged" with value "1" if we are logged in and nothing  if we are not.

Now why I have saved two files with "IC"  extension, it is because in WhizBase I can tell the server not to  interpret files with "IC" extension if it is called directly, these  files can only be called with-in a WhizBase file by $wbrinc or $wbinc.  This process is called including files. In this case I am using $wbrinc  because I do not want to render the file until it is needed. In my case I  have two files "secure.ic and login.ic", so I will render one of them  only. $wbinc would include and render both files and that takes more  resources. You can check the differences between these two functions in  the help file of WhizBase.

If yes, which is if the session  variable "logged" have a value "1" the user is logged in, so I will show  him the content of "secured.ic", if not I will show him the content of  "login.ic".

Finally save this file as "default.wbsp", this is  just a one file example, if you have more than one page you rather use a  DB than "IC" files.

&lt;b&gt;Log-in process&lt;/b&gt;
In this file I will  check if the username and the password the visitor provided do match  with the data in the DB. I will use the DB I have created in my last  article &lt;a rel="noindex nofollow" target="_blank" href="http://www.experts-exchange.com/articles/Programming/Languages/Scripting/Create-an-AJAX-supported-registration-form-with-WhizBase.html"&gt;"Create  an AJAX supported registration form with WhizBase"&lt;/a&gt;.

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
WB_UseSessions=T &lt;br /&gt;
#* We need sessions *#&lt;br /&gt;
WB_command=Q &lt;br /&gt;
#* Query the DB *#&lt;br /&gt;
WB_BaseName=reg.mdb &lt;br /&gt;
#* connect to red.mdb DB file*#&lt;br /&gt;
WB_RcdSet=profile &lt;br /&gt;
#* use profile table for our query*#&lt;br /&gt;
WB_Query=username=&amp;#39;$wbv{username}&amp;#39; and password=&amp;#39;$wbv{password}&amp;#39; &lt;br /&gt;
#* get all records which have this username and this password in the same time *#&lt;br /&gt;
WB_MaxRec=1 &lt;br /&gt;
#* one record is enough *#&lt;br /&gt;
[MsgAndLbl]&lt;br /&gt;
WBM_NoMatch=$empty$&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
$wbif[$wbp[RC]=1| #* if we have match we will have one record *#&lt;br /&gt;
   $wbsets[logged|1|f] #* set logged as 1 *#&lt;br /&gt;
   $wbsets[username|$wbv[username]|f] #* set username with the username provided *#&lt;br /&gt;
   You have been successfully logged in, please click &amp;lt;a href=&amp;quot;default.wbsp&amp;quot;&amp;gt;here&amp;lt;/a&amp;gt; to return to your page.&lt;br /&gt;
|&lt;br /&gt;
   Your username and password does not match, please go back and try again!&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;
&lt;/div&gt;

In this file I will use sessions, I need to set the session variable  "logged" as "1" if the user provides true data. Here I am querying the  DB looking for a match, I need just one record with the provided  username and password. One record is enough because there is no two  users with the same username.

I am using $wbp[RC] to return  number of records returned by the query, I can get one record or no  records, If there is one record then it is a match and the session  variable "logged" is set to "1", I will also set the session variable  "username" with the username provided.

In case I do not have a  match, simply give an error message.

For more information email  me at: NurAzije [at] Gmail [dot] com Or visit the WhizBase official site  at &lt;a rel="noindex nofollow" target="_blank" href="http://www.whizbase.com/"&gt;www.whizbase.com&lt;/a&gt;

NurAzije is a  PHP and WhizBase programmer, who at the time of article publication is  working in partnership with WhizBase on several projects.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-8816494897445545268?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.whizbase.com' title='Create a log-in system for registered users with WhizBase'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/8816494897445545268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2010/05/create-log-in-system-for-registered.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/8816494897445545268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/8816494897445545268'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2010/05/create-log-in-system-for-registered.html' title='Create a log-in system for registered users with WhizBase'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-7752821319443726234</id><published>2010-03-17T09:33:00.002+01:00</published><updated>2010-03-17T09:50:54.502+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='whizbase'/><category scheme='http://www.blogger.com/atom/ns#' term='Security'/><category scheme='http://www.blogger.com/atom/ns#' term='XHTML'/><category scheme='http://www.blogger.com/atom/ns#' term='AJAX'/><category scheme='http://www.blogger.com/atom/ns#' term='Registration'/><category scheme='http://www.blogger.com/atom/ns#' term='confirmation email'/><category scheme='http://www.blogger.com/atom/ns#' term='Password'/><title type='text'>Create an AJAX supported registration form with WhizBase</title><content type='html'>&lt;p&gt;This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you might look at some of my other articles on WhizBase).&lt;/p&gt;

&lt;h2&gt;The Structure&lt;/h2&gt;
&lt;p&gt;I will first explain the structure of our registration form, as I am using AJAX, I will not have any refresh for our page, so I will have one main page with the HTML and JS code.&lt;/p&gt;

&lt;p&gt;For the validation process I will use one WhizBase file, for submitting registration data I will use another WhizBase file.&lt;/p&gt;

&lt;p&gt;To store the registration information I will need a DB, and for this demonstration I will use the simplest one, Microsoft Access DB.&lt;/p&gt;

&lt;p&gt;Every registration process needs a confirmation process to reduce spam registrations. So I will need one WhizBase file for confirmation, for sending the email I will use two files (I will explain why later in this article).&lt;/p&gt;

&lt;p&gt;Now let give names, I will create default.wbsp, validate.wbsp, submit.wbsp, mail.wbsp, blank.html and confirm.wbsp. I will create reg.mdb for DB.&lt;/p&gt;

&lt;h2&gt;Registration Elements&lt;/h2&gt;
&lt;p&gt;The registration form will contain a user name, first name, last name, email and password. All elements are required, so no element must be empty. The user name must be available, the password must be repeated to confirm the password and the email must be real.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;Registration Form&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
function loadXMLDoc(url,rezult)&lt;br /&gt;
{&lt;br /&gt;
if (window.XMLHttpRequest)&lt;br /&gt;
  {// code for IE7+, Firefox, Chrome, Opera, Safari&lt;br /&gt;
  xmlhttp=new XMLHttpRequest();&lt;br /&gt;
  }&lt;br /&gt;
else&lt;br /&gt;
  {// code for IE6, IE5&lt;br /&gt;
  xmlhttp=new ActiveXObject(&amp;quot;Microsoft.XMLHTTP&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
xmlhttp.open(&amp;quot;GET&amp;quot;,url,false);&lt;br /&gt;
xmlhttp.send(null);&lt;br /&gt;
document.getElementById(rezult).innerHTML=xmlhttp.responseText;&lt;br /&gt;
}&lt;br /&gt;
function Validate()&lt;br /&gt;
{&lt;br /&gt;
         loadXMLDoc('validate.wbsp?username='+document.getElementById(&amp;quot;username&amp;quot;).value+'&amp;amp;fname='+document.getElementById(&amp;quot;fname&amp;quot;).value+'&amp;amp;lname='+document.getElementById(&amp;quot;lname&amp;quot;).value+'&amp;amp;password='+document.getElementById(&amp;quot;password&amp;quot;).value+'&amp;amp;password2='+document.getElementById(&amp;quot;password2&amp;quot;).value+'&amp;amp;email='+document.getElementById(&amp;quot;email&amp;quot;).value,'msgs');&lt;br /&gt;
         if(document.getElementById('msgs').innerHTML==&amp;quot;&amp;quot;){&lt;br /&gt;
              loadXMLDoc('submit.wbsp?wbf_username='+document.getElementById(&amp;quot;username&amp;quot;).value+'&amp;amp;wbf_fname='+document.getElementById(&amp;quot;fname&amp;quot;).value+'&amp;amp;wbf_lname='+document.getElementById(&amp;quot;lname&amp;quot;).value+'&amp;amp;wbf_password='+document.getElementById(&amp;quot;password&amp;quot;).value+'&amp;amp;wbf_email='+document.getElementById(&amp;quot;email&amp;quot;).value,'msgs');&lt;br /&gt;
         }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;msgs&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;fieldset&amp;gt;&amp;lt;legend&amp;gt;Enter your information in the form below.&amp;lt;/legend&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Username:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;username&amp;quot; id=&amp;quot;username&amp;quot; size=&amp;quot;40&amp;quot; maxlength=&amp;quot;60&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
First Name:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;fname&amp;quot; id=&amp;quot;fname&amp;quot; size=&amp;quot;40&amp;quot; maxlength=&amp;quot;60&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Last Name:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;lname&amp;quot; id=&amp;quot;lname&amp;quot; size=&amp;quot;40&amp;quot; maxlength=&amp;quot;60&amp;quot;/&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Password:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;password&amp;quot; name=&amp;quot;password&amp;quot; id=&amp;quot;password&amp;quot; size=&amp;quot;40&amp;quot; maxlength=&amp;quot;60&amp;quot;/&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Confirm Your Password:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;password&amp;quot; name=&amp;quot;password2&amp;quot; id=&amp;quot;password2&amp;quot; size=&amp;quot;40&amp;quot; maxlength=&amp;quot;60&amp;quot;/&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
E-Mail:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;email&amp;quot; id=&amp;quot;email&amp;quot; size=&amp;quot;40&amp;quot; maxlength=&amp;quot;60&amp;quot;/&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;
&amp;lt;/fieldset&amp;gt;&lt;br /&gt;
&amp;lt;div align=&amp;quot;center&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;Submit&amp;quot; onclick=&amp;quot;Validate();&amp;quot; /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;

&lt;p&gt;Let me now explain the HTML and JS code. The HTML code have the basic elements of the registration, I have input text fields to insert data needed for the registration with two password fields (for the password, and a second for confirmation). Finally I have a submit button and a div for viewing system messages.&lt;/p&gt;

&lt;p&gt;The JS code has two functions, the first is the AJAX JS function, the other is the validate function that I call when I submit the form.&lt;/p&gt;

&lt;p&gt;You will notice I call AJAX for two reasons, one is for validating the data in the form, the second is for saving the data in the DB.&lt;/p&gt;

&lt;h2&gt;Validation process&lt;/h2&gt;
&lt;p&gt;I will create a file for validating form data and will name it as "validate.wbsp". In this script I need to validate data, if there is errors I must display an error message, if not, keep the output empty. The output will be returned by AJAX and displayed in the messages div.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
wb_basename=reg.mdb&lt;br /&gt;
wb_rcdset=profile&lt;br /&gt;
WB_Command=Q&lt;br /&gt;
wb_query=username=&amp;quot;$wbv{username}&amp;quot;&lt;br /&gt;
wb_maxrec=1&lt;br /&gt;
[MsgAndLbl]&lt;br /&gt;
WBM_NoMatch=$wbsetv{msg|}&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;$wbif[&amp;quot;$wbp[rc]&amp;quot;=1|$wbsetv[msg|The username is not available, plase choose another!&amp;lt;br /&amp;gt;]|]$wbif[&amp;quot;$wbv[username]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[msg|$wbgetv[msg]Please write your username!&amp;lt;br /&amp;gt;]|]$wbif[&amp;quot;$wbv[fname]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[msg|$wbgetv[msg]Please write your first name!&amp;lt;br /&amp;gt;]|]$wbif[&amp;quot;$wbv[lname]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[msg|$wbgetv[msg]Please write your first name!&amp;lt;br /&amp;gt;]|]$wbsplit[$wbv[email]|email_array|@|F]$wbsplit[$wbgetv[email_array(1)]|domain|.|F]$wbif[&amp;quot;$wbv[password]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[msg|$wbgetv[msg]Please insert a password!&amp;lt;br /&amp;gt;]|]$wbif[&amp;quot;$wbv[password]&amp;quot;&amp;lt;&amp;gt;&amp;quot;$wbv[password2]&amp;quot;|$wbsetv[msg|$wbgetv[msg]Your passwords do not match!&amp;lt;br /&amp;gt;]|]$wbif[($wbcstr[$wbv[email]|@]=1) and ($wblen[$wbgetv[email_array(0)]]&amp;gt;0) and ($wblen[$wbgetv[email_array(1)]]&amp;gt;0) and ($wblen[$wbgetv[domain(0)]]&amp;gt;0) and (($wblen[$wbgetv[domain(1)]]&amp;gt;1) and ($wblen[$wbgetv[domain(1)]]&amp;lt;5))||$wbsetv[msg|$wbgetv[msg]Please insert a valid email address&amp;lt;br /&amp;gt;]]$wbgetv[msg]&lt;/div&gt;

&lt;p&gt;WhizBase do not recognize lines, it's code is directly embeded in HTML, so any extra white space or break will show in the HTML, so I have removed all white spaces and breaks I do not need.&lt;/p&gt;

&lt;p&gt;Let us go through the code step by step.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
wb_basename=reg.mdb&lt;br /&gt;
wb_rcdset=profile&lt;br /&gt;
WB_Command=Q&lt;br /&gt;
wb_query=username=&amp;quot;$wbv{username}&amp;quot;&lt;br /&gt;
wb_maxrec=1&lt;br /&gt;
[MsgAndLbl]&lt;br /&gt;
WBM_NoMatch=$wbsetv{msg|}&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;
&lt;/div&gt;

&lt;p&gt;Here I am connecting to my DB Access file with the record set (table) profile, making a Query command and giving a where clause option username=&amp;quot;$wbv{username}&amp;quot;, where $wbv{username} will show the parameter I sent by AJAX by get or post method. For WhizBase get and post are the same.&lt;/p&gt;

&lt;p&gt;I am limiting the records with 1 maximum, because I just want to check if the username already exists in the DB. If there is no records I will set the msg variable empty, I will need this variable later in the code. WBM_NoMatch gives &amp;quot;No Matching records&amp;quot; message by default, I do not want that, so I am just setting a variable.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
$wbif[&amp;quot;$wbp[rc]&amp;quot;=1|$wbsetv[msg|The username is not available, please choose another!&amp;lt;br /&amp;gt;]|]&lt;/div&gt;

&lt;p&gt;If the query above returns data I will give an error message that the username is not available, and save the message in the msg variable. I'm using an IF statement and check if $wbp[rc] which returns the number of records are equal to one.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;$wbif[&amp;quot;$wbv[username]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[msg|$wbgetv[msg]Please write your username!&amp;lt;br /&amp;gt;]|]&lt;/div&gt;

&lt;p&gt;In case the username is empty I give an error message to write the username. When I assign the message to the variable I must not forget the messages we have from before, so I use wbgetv in wbsetv to add the past ones also.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
$wbif[&amp;quot;$wbv[fname]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[msg|$wbgetv[msg]Please write your first name!&amp;lt;br /&amp;gt;]|]&lt;br /&gt;
$wbif[&amp;quot;$wbv[lname]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[msg|$wbgetv[msg]Please write your first name!&amp;lt;br /&amp;gt;]|]&lt;br /&gt;
$wbif[&amp;quot;$wbv[password]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[msg|$wbgetv[msg]Please insert a password!&amp;lt;br /&amp;gt;]|]&lt;/div&gt;

&lt;p&gt;The same process as before I do for the first name, the last name and the password.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;$wbif[&amp;quot;$wbv[password]&amp;quot;&amp;lt;&amp;gt;&amp;quot;$wbv[password2]&amp;quot;|$wbsetv[msg|$wbgetv[msg]Your passwords do not match!&amp;lt;br /&amp;gt;]|]&lt;/div&gt;

&lt;p&gt;If the passwords do not match, it is also an error. WhizBase uses &amp;lt;&amp;gt; for not equal. If you put != it will provoke a syntax error.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
$wbsplit[$wbv[email]|email_array|@|F]&lt;br /&gt;
$wbsplit[$wbgetv[email_array(1)]|domain|.|F]&lt;br /&gt;
$wbif[($wbcstr[$wbv[email]|@]=1) and ($wblen[$wbgetv[email_array(0)]]&amp;gt;0) and ($wblen[$wbgetv[email_array(1)]]&amp;gt;0) and ($wblen[$wbgetv[domain(0)]]&amp;gt;0) and (($wblen[$wbgetv[domain(1)]]&amp;gt;1) and ($wblen[$wbgetv[domain(1)]]&amp;lt;5))||$wbsetv[msg|$wbgetv[msg]Please insert a valid email address&amp;lt;br /&amp;gt;]]&lt;/div&gt;

&lt;p&gt;Checking the email if it is valid is a little more complicated process: I need to check if the email address has an @ sign, and if it has at least one character before and after the @ sign. I also check if the domain name part before the dot has at least one character, and if the TLD part is at least 2 characters but not more than four.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;$wbgetv[msg]&lt;/div&gt;

&lt;p&gt;Finally I display the error messages I have collected, if no error messages are provoked I will have an empty variable. This data is displayed by AJAX in my messages div.&lt;/p&gt;

&lt;h2&gt;The Database&lt;/h2&gt;
&lt;p&gt;Before I go with the submitting data process, I need to show you the DB I have created. It is one DB containing one table called profile. Profile contains seven fields. The id is an auto-incremental field. The confirm field is a number type field with zero default value. The rest fields (username, fname, lname, password, email) are text type fields. I am saving the DB as "reg.mdb" access file.&lt;/p&gt;

&lt;h2&gt;Submitting the data&lt;/h2&gt;
&lt;p&gt;The submitting section of the code doesn't just save data to the DB, it also calls the email file to send a confirmation request email.&lt;/p&gt;

&lt;p&gt;Before I get to that, I pass the parameters in the URL using JS, a little bit different than before. I am use a wbf_ prefix for every parameter I want to add to the DB. WhizBase takes them automatically and filters them, then adds them in the location we specify.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;[FormFields]&lt;br /&gt;
wb_basename=reg.mdb&lt;br /&gt;
wb_rcdset=profile&lt;br /&gt;
WB_Command=A&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;$wbgeturl[mail.wbsp?id=$wbf[id]&amp;amp;email=$wbf[email]]You will recieve a confirmation email to finish the registration process.&lt;/div&gt;

&lt;p&gt;This code will save the data in reg.mdb DB, in profile table using Add command. I will use wbgeturl function to call the email sending file, I am passing the id and the email of the last inserted data. By $wbf I can get the data inserted by this operation.&lt;/p&gt;

&lt;p&gt;I return via AJAX the message &amp;quot;You will receive a confirmation email to finish the registration process.&amp;quot;.&lt;/p&gt;

&lt;p&gt;At this time I have data in the DB, but it is still not confirmed. I have created a confirm field in the DB which has by default a zero value.&lt;/p&gt;

&lt;h2&gt;Sending email&lt;/h2&gt;
&lt;p&gt;Sending an email in WhizBase is very easy, it supports HTML by default, anything I write in this file after the &amp;quot;&amp;lt;!--WB_BeginTemplate--&amp;gt;&amp;quot; code, will be shown in the email. So I must be careful what I write.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;[FormFields]&lt;br /&gt;
WB_Command=P&lt;br /&gt;
WB_From=admin@yourdomain.com&lt;br /&gt;
WB_Redirect=blank.html&lt;br /&gt;
WB_Subject=Please confirm your registration&lt;br /&gt;
wb_mailserver=mail.yourdomain.com&lt;br /&gt;
WB_To=$wbv{email}&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;Please click &amp;lt;a href=&amp;quot;http://www.yourdomain.com/confirm.wbsp?wbf_id=$wbv[id]&amp;quot;&amp;gt;here&amp;lt;/a&amp;gt; to confirm your registration.&lt;/div&gt;

&lt;p&gt;The command P is for sending custom email. I specify the email address I am sending from, as well as from which mail server, the recipient's email address, and the subject of the email. After the  &amp;quot;&amp;lt;!--WB_BeginTemplate--&amp;gt;&amp;quot; code I write everything I want to show in the email, which in this case is a link to the confirmation page, with the id of the profile I saved.&lt;/p&gt;

&lt;p&gt;I call this file with the wbgeturl function, which will show me the data returned from the file called. So I need to return nothing by redirecting the page I am calling to blank.html (which is a blank file). The redirect in WhizBase is made on the server side, so I do not get the message of the email, but the blank page.&lt;/p&gt;

&lt;h2&gt;Confirmation process&lt;/h2&gt;
&lt;p&gt;When the guest makes a registration he will receive my email for confirmation, the link to the confirmation must be clicked, which will call my file for confirmation.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;[FormFields]&lt;br /&gt;
wb_basename=reg.mdb&lt;br /&gt;
wb_rcdset=profile&lt;br /&gt;
WB_Command=U&lt;br /&gt;
WB_UID=id&lt;br /&gt;
WB_FORCED=wbf_confirm=1&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;Now you can login to the system!&lt;/div&gt;

&lt;p&gt;The confirmation will update the DB, and put value 1 in the field confirm for the specified profile. Updating the DB is simple, I specify the DB name, the recordset (table) name, the U command for update, I specify which field is the unique identifier for this process. In our case it is ID. And I will force one parameter as it is sent with the URL call, it is wbf_confirm = 1.&lt;/p&gt;

&lt;p&gt;Finally I tell the guest that he has become a user. In the next article I will show you how to make a Login in WhizBase code.&lt;/p&gt;

&lt;p&gt;For more information email me at: NurAzije [at] Gmail [dot] com
Or visit the WhizBase official site at &lt;a href="http://www.whizbase.com" title="WhizBase Server Pages"&gt;www.whizbase.com&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-7752821319443726234?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.experts-exchange.com/articles/Programming/Languages/Scripting/Create-an-AJAX-supported-registration-form-with-WhizBase.html' title='Create an AJAX supported registration form with WhizBase'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/7752821319443726234/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2010/03/create-ajax-supported-registration-form.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/7752821319443726234'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/7752821319443726234'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2010/03/create-ajax-supported-registration-form.html' title='Create an AJAX supported registration form with WhizBase'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-1789738967643810752</id><published>2010-03-17T09:14:00.002+01:00</published><updated>2010-03-17T09:31:56.985+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='whizbase'/><category scheme='http://www.blogger.com/atom/ns#' term='pager'/><category scheme='http://www.blogger.com/atom/ns#' term='subroutine'/><category scheme='http://www.blogger.com/atom/ns#' term='ICQ'/><title type='text'>Using WhizBase to send ICQ messages</title><content type='html'>&lt;p&gt;In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version.&lt;/p&gt;

&lt;p&gt;In this tutorial I will use 3 files, pager.wbsp for the processing, email.wbsp for sending the messages and eng.ic as a language file.&lt;/p&gt;

&lt;h2&gt;Multilingual abilities&lt;/h2&gt;
&lt;p&gt;WhizBase has built-in multilingual support, but I will not use it in this tutorial because it is not supported in 5.1 version. So I will use the older method of including a language file.&lt;/p&gt;

&lt;p&gt;In this language file we will define variables with the language content:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
$wbsetv[l_send|Send the message to this ICQ number:]&lt;br /&gt;
$wbsetv[l_emne|Subject:]&lt;br /&gt;
$wbsetv[l_besked|Message:]&lt;br /&gt;
$wbsetv[l_ditnavn|Your name:]&lt;br /&gt;
$wbsetv[l_dinepost|Your email address:]&lt;br /&gt;
$wbsetv[l_sendbeskeden|Send the message]&lt;br /&gt;
$wbsetv[l_icqikkeudfyldt|You forgot to fill in the ICQ number that the message should be sent to.]&lt;br /&gt;
$wbsetv[l_ingenbesked|You forgot to write a message.]&lt;br /&gt;
$wbsetv[l_tilbage|Back]&lt;br /&gt;
$wbsetv[l_over450tegn|The message is too long. Maximum is 450 characters.]&lt;br /&gt;
$wbsetv[l_epostikkeudfyldt|You forgot to fill in your email address.]&lt;br /&gt;
$wbsetv[l_beskedenafsendt|The message has been sent.]
&lt;/div&gt;

&lt;p&gt;I've used $wbsetv to set language variables, now I will save this code as &amp;quot;lang.ic&amp;quot; and put it in lang folder I have created on webs root. I have that practice to separate language files from others.&lt;/p&gt;

&lt;h2&gt;Subroutine code&lt;/h2&gt;
&lt;p&gt;WhizBase supports subroutines (from version 5.1 on); it is something like a custom function available in some languages like VB. This is a powerful new technology in WhizBase which eases rapid application developments.&lt;/p&gt;

&lt;p&gt;The code of a subroutine can be added in any place in WhizBase code, but it is preferably to put it after &amp;lt;!--WB_BeginTemplate--&amp;gt; so we can find it easily.&lt;/p&gt;

&lt;p&gt;The syntax used for adding subroutines is:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
&amp;lt;!--WB_BeginSub_subroutinename--&amp;gt;&lt;br /&gt;
subroutine code&lt;br /&gt;
&amp;lt;!--WB_EndSub--&amp;gt;&lt;/div&gt;

&lt;p&gt;We will need to provide the subroutine name and the subroutine code, which is any set of WhizBase commands and code.&lt;/p&gt;

&lt;p&gt;I will make a subroutine to show a back input with error message if the user makes any mistake in the form.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
#* we define the pager Subroutine *#&lt;br /&gt;
&amp;lt;!--WB_BeginSub_pager--&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Pager&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;style type=text/css&amp;gt;&lt;br /&gt;
body {background:white; font-family:helvetica; font-size:10pt; color:#000000}
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;$wbgetv[msg]&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;button&amp;quot; onClick=&amp;quot;history.go(-1)&amp;quot; value=&amp;quot;&amp;amp;lt;&amp;amp;lt;&amp;amp;lt; $wbgetv[l_tilbage]&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;!--WB_EndSub--&amp;gt;&lt;/div&gt;

&lt;h2&gt;Call the language file&lt;/h2&gt;
&lt;p&gt;I will call the language file by wbrinc after defining which language I am using.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;#* Please set here your language file *#&lt;br /&gt;
$wbsetv[lang|eng]&lt;br /&gt;
#**************************************#&lt;br /&gt;
&lt;br /&gt;
#* We include the language file *#&lt;br /&gt;
$wbrinc[lang/$wbgetv[lang].ic]&lt;/div&gt;

&lt;p&gt;As you see I am using relative paths but I can also use absolute paths, WhizBase supports both.&lt;/p&gt;

&lt;h2&gt;The Form&lt;/h2&gt;
&lt;p&gt;I will make a simple HTML form which submits the page to itself, I will put it in a variable so I can use it later where I need it.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
$wbsetv[formular|&amp;lt;form action=&amp;quot;&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;&amp;lt;table bgcolor=&amp;quot;#cccccc&amp;quot; border=&amp;quot;#000000&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;arial&amp;quot; color=&amp;quot;#000000&amp;quot;&amp;gt;$wbgetv[l_send]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;icqnummer&amp;quot; size=&amp;quot;25&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;arial&amp;quot; color=&amp;quot;#000000&amp;quot;&amp;gt;$wbgetv[l_emne]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;emne&amp;quot; size=&amp;quot;25&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;arial&amp;quot; color=&amp;quot;#000000&amp;quot;&amp;gt;$wbgetv[l_besked]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;textarea name=&amp;quot;besked&amp;quot; cols=&amp;quot;25&amp;quot; rows=&amp;quot;8&amp;quot; wrap&amp;quot;=virtual&amp;quot;&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;arial&amp;quot; color=&amp;quot;#000000&amp;quot;&amp;gt;$wbgetv[l_ditnavn]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;navn&amp;quot; size=&amp;quot;25&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;arial&amp;quot; color=&amp;quot;#000000&amp;quot;&amp;gt;$wbgetv[l_dinepost]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;epost&amp;quot; size=&amp;quot;25&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;arial&amp;quot; color=&amp;quot;#000000&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; value=&amp;quot;$wbgetv[l_sendbeskeden]&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/form&amp;gt;]&lt;/div&gt;

&lt;p&gt;As I previously indicated, I am using language file's variables instead of text. This is to support multilingualism.&lt;/p&gt;

&lt;h2&gt;If this do that, if not do not, then do that or this&lt;/h2&gt;

&lt;p&gt;I made a simple validation IF conditions block, I am using this like that just to show how we can use complex IF conditions in WhizBase, but in real life I use JS for this type of validation - then there's no need to refresh the page to validate if an input is empty.&lt;/p&gt;


&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
$wbif[&amp;quot;$wbv[submit]&amp;quot;&amp;lt;&amp;gt;&amp;quot;&amp;quot;|&lt;br /&gt;
        $wbsetv[OK|1]&lt;br /&gt;
 $wbif[&amp;quot;$wbv[emne]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[OK|0]$wbsetv[emne|No subject]|$wbsetv[emne|$wbv[emne]]]&lt;br /&gt;
 $wbif[&amp;quot;$wbv[navn]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[OK|0]$wbsetv[navn|No name]|$wbsetv[navn|$wbv[navn]]]&lt;br /&gt;&lt;br /&gt;

 #* If no ICQ number was specified...  *#&lt;br /&gt;
 $wbif[&amp;quot;$wbv[icqnummer]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_icqikkeudfyldt]] $wbsub[pager]|&lt;br /&gt;
          #* If the user did not write a message...  *#&lt;br /&gt;
     $wbif[$wblen[$wbv[besked]]=0|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_ingenbesked]] $wbsub[pager]|&lt;br /&gt;&lt;br /&gt;
          
            #* The message body cannot contain more than 450 characters  *#&lt;br /&gt;&lt;br /&gt;
         $wbif[$wblen[$wbv[besked]]&amp;gt;450|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_over450tegn]] $wbsub[pager]|&lt;br /&gt;&lt;br /&gt;

                #* If the user did not specify his/her email address...  *#&lt;br /&gt;&lt;br /&gt;
                $wbif[$wblen[$wbv[epost]]=0|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_epostikkeudfyldt]] $wbsub[pager]|]&lt;br /&gt;
            ]&lt;br /&gt;
          ]&lt;br /&gt;
        ]&lt;br /&gt;&lt;br /&gt;

 #* Sending the message *#&lt;br /&gt;
 $wbif[$wbgetv[OK]=1|$wbsetv[msg|$wbgetv[l_beskedenafsendt]] $wbsetv[to|$wbv[icqnummer]@pager.icq.com] $wbsetv[body|$wbv[besked]] $wbsetv[from|$wbgetv[navn] &amp;lt;$wbv[epost]&amp;gt;] $wbgeturl[email.wbsp?to=$wbesc[$wbgetv[to]]&amp;amp;from=$wbesc[$wbgetv[from]]&amp;amp;body=$wbesc[$wbgetv[body]]]|] &lt;br /&gt;
|&lt;br /&gt;
$wbgetv[formular]&lt;br /&gt;
]
&lt;/div&gt;

&lt;p&gt;The first IF is to check if I have submitted the form or I am coming to the site first time. If the submit is submitted I will go ahead with validation, if not I will show the form variable.&lt;/p&gt;

&lt;p&gt;Then I have a number of conditions, if everything is OK I will go on and send the message to ICQ, if not I will define the error message from the language file and call the subroutine.&lt;/p&gt;

&lt;p&gt;If everything is OK, I call a file I will create later by $wbgeturl, I named it email.wbsp, and will pass to it variables to, from, and body. All escaped by $wbesc function.&lt;/p&gt;

&lt;p&gt;In case one of the conditions do not pass I call the subroutine pager by $wbsub[] to show the error message.&lt;/p&gt;

&lt;p&gt;In case I did not submit a form yet it will skip all the conditions and show me the form we specified above before.&lt;/p&gt;

&lt;p&gt;Now we will put all this together in one file:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
WB_Command=R&lt;br /&gt;
wb_showlogo=F&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;br /&gt;
#* Please set here your language file *#&lt;br /&gt;
$wbsetv[lang|eng]&lt;br /&gt;
#**************************************#&lt;br /&gt;&lt;br /&gt;

#* We include the language file *#&lt;br /&gt;
$wbrinc[lang/$wbgetv[lang].ic]&lt;br /&gt;&lt;br /&gt;

#* we define the pager Subroutine *#&lt;br /&gt;
&amp;lt;!--WB_BeginSub_pager--&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Pager&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;style type=text/css&amp;gt;&lt;br /&gt;
body {background:white; font-family:helvetica; font-size:10pt; color:#000000}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;$wbgetv[msg]&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;button&amp;quot; onClick=&amp;quot;history.go(-1)&amp;quot; value=&amp;quot;&amp;amp;lt;&amp;amp;lt;&amp;amp;lt; $wbgetv[l_tilbage]&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;
&amp;lt;!--WB_EndSub--&amp;gt;&lt;br /&gt;&lt;br /&gt;

$wbsetv[formular|&amp;lt;form action=&amp;quot;&amp;quot; method=&amp;quot;post&amp;quot;&amp;gt;&amp;lt;TABLE bgcolor=&amp;quot;#cccccc&amp;quot; border=&amp;quot;#000000&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;arial&amp;quot; color=&amp;quot;#000000&amp;quot;&amp;gt;$wbgetv[l_send]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;icqnummer&amp;quot; size=&amp;quot;25&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;arial&amp;quot; color=&amp;quot;#000000&amp;quot;&amp;gt;$wbgetv[l_emne]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;emne&amp;quot; size=&amp;quot;25&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;arial&amp;quot; color=&amp;quot;#000000&amp;quot;&amp;gt;$wbgetv[l_besked]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;textarea name=&amp;quot;besked&amp;quot; cols=&amp;quot;25&amp;quot; rows=&amp;quot;8&amp;quot; wrap&amp;quot;=virtual&amp;quot;&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;arial&amp;quot; color=&amp;quot;#000000&amp;quot;&amp;gt;$wbgetv[l_ditnavn]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;navn&amp;quot; size=&amp;quot;25&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;arial&amp;quot; color=&amp;quot;#000000&amp;quot;&amp;gt;$wbgetv[l_dinepost]&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;epost&amp;quot; size=&amp;quot;25&amp;quot; /&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;font size=&amp;quot;2&amp;quot; face=&amp;quot;arial&amp;quot; color=&amp;quot;#000000&amp;quot;&amp;gt;&amp;lt;input type=&amp;quot;submit&amp;quot; name=&amp;quot;submit&amp;quot; value=&amp;quot;$wbgetv[l_sendbeskeden]&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&amp;lt;/form&amp;gt;]&lt;br /&gt;&lt;br /&gt;

$wbif[&amp;quot;$wbv[submit]&amp;quot;&amp;lt;&amp;gt;&amp;quot;&amp;quot;|&lt;br /&gt;
        $wbsetv[OK|1]&lt;br /&gt;
 $wbif[&amp;quot;$wbv[emne]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[OK|0]$wbsetv[emne|No subject]|$wbsetv[emne|$wbv[emne]]]&lt;br /&gt;
 $wbif[&amp;quot;$wbv[navn]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[OK|0]$wbsetv[navn|No name]|$wbsetv[navn|$wbv[navn]]]&lt;br /&gt;&lt;br /&gt;

 #* If no ICQ number was specified...  *#&lt;br /&gt;
 $wbif[&amp;quot;$wbv[icqnummer]&amp;quot;=&amp;quot;&amp;quot;|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_icqikkeudfyldt]] $wbsub[pager]|&lt;br /&gt;
          #* If the user did not write a message...  *#&lt;br /&gt;
     $wbif[$wblen[$wbv[besked]]=0|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_ingenbesked]] $wbsub[pager]|&lt;br /&gt;&lt;br /&gt;
          
            #* The message body cannot contain more than 450 characters  *#&lt;br /&gt;&lt;br /&gt;
         $wbif[$wblen[$wbv[besked]]&amp;gt;450|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_over450tegn]] $wbsub[pager]|&lt;br /&gt;&lt;br /&gt;

                #* If the user did not specify his/her email address...  *#&lt;br /&gt;&lt;br /&gt;
                $wbif[$wblen[$wbv[epost]]=0|$wbsetv[OK|0]$wbsetv[msg|$wbgetv[l_epostikkeudfyldt]] $wbsub[pager]|]&lt;br /&gt;
            ]&lt;br /&gt;
          ]&lt;br /&gt;
        ]&lt;br /&gt;&lt;br /&gt;

 #* Sending the message *#&lt;br /&gt;
 $wbif[$wbgetv[OK]=1|$wbsetv[msg|$wbgetv[l_beskedenafsendt]] $wbsetv[to|$wbv[icqnummer]@pager.icq.com] $wbsetv[body|$wbv[besked]] $wbsetv[from|$wbgetv[navn] &amp;lt;$wbv[epost]&amp;gt;] &lt;br /&gt;$wbgeturl[email.wbsp?to=$wbesc[$wbgetv[to]]&amp;amp;from=$wbesc[$wbgetv[from]]&amp;amp;body=$wbesc[$wbgetv[body]]]|] &lt;br /&gt;
|&lt;br /&gt;
$wbgetv[formular]&lt;br /&gt;
]
&lt;/div&gt;
&lt;p&gt;Save this file as default.wbsp.&lt;/p&gt;

&lt;h2&gt;Sending the email&lt;/h2&gt;

&lt;p&gt;Finally the message we want to send to some ICQ account we send it by email. In WhizBase sending emails are very simple. You just need four variables, three we have already passed in the $wbgeturl function and the fourth is set in this file.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;[FormFields]&lt;br /&gt;
wb_mailserver=mail.localhost #* Here we define the outgoing mail server *#&lt;br /&gt;
wb_command=p&lt;br /&gt;
WB_To=$wbv{to}&lt;br /&gt;
WB_From=$wbv{from}&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;br /&gt;
$wbv[body]&lt;/div&gt;

&lt;p&gt;I hope this tutorial helped you learn more about WhizBase capabilities. Until the next article, have a good time.&lt;/p&gt;

&lt;p&gt;For more information email me at: NurAzije [at] Gmail [dot] com
Or visit WhizBase official site at &lt;a href="http://www.whizbase.com" title="WhizBase Server Pages"&gt;www.whizbase.com&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-1789738967643810752?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.experts-exchange.com/articles/Programming/Languages/Scripting/Learn-WhizBase-by-an-ICQ-pager.html' title='Using WhizBase to send ICQ messages'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/1789738967643810752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2010/03/using-whizbase-to-send-icq-messages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/1789738967643810752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/1789738967643810752'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2010/03/using-whizbase-to-send-icq-messages.html' title='Using WhizBase to send ICQ messages'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-8847606575227803913</id><published>2010-03-04T09:46:00.004+01:00</published><updated>2010-03-04T10:02:36.767+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='whizbase'/><category scheme='http://www.blogger.com/atom/ns#' term='101 tutorial'/><title type='text'>Whizbase fast tutorial</title><content type='html'>&lt;h2&gt;Introduction&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;The syntax of  WhizBase is directly embedded in HTML code, for example if you want to  show the current date you use:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
This is the date today: $WBFN[DATE]
&lt;/div&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;Conditional Programming&lt;/h2&gt;

&lt;p&gt;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:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
$WBIF[expression|true part|false part]
&lt;/div&gt;

&lt;p&gt;If we need to show the string "Today is Friday" only when it is Friday we use:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;$WBIF[ $WBFN[WEEKDAYS] = &amp;quot;Friday&amp;quot;&lt;br /&gt;
|&lt;br /&gt;
Today is Friday&lt;br /&gt;
|&lt;br /&gt;
I am sorry today is not Friday&lt;br /&gt;
]&lt;/div&gt;

&lt;p&gt;If just IF and ELSE are not sufficient (we want more than one case) we must use the CASE statement:&lt;/p&gt;


&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;$WBCASE[separator|value|conditionlist|resultlist|default]&lt;/div&gt;

&lt;p&gt;For the seven days in the week:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
$WBCASE[,|$WBFN[WEEKDAYN]&lt;br&gt;
|&lt;br&gt;
=1,=2,=3,=4,=5,=6,=7&lt;br&gt;
|&lt;br&gt;
Today is Sunday, Today is Monday, Today is Tuesday, Today is Wednesday, Today is Thursday, Today is Friday, Today is Saturday&lt;br&gt;
|&lt;br&gt;
Today is unknown!&lt;br&gt;
]
&lt;/div&gt;

&lt;h2&gt;Passing Data from a Form&lt;/h2&gt;
&lt;p&gt;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:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;process.wbsp&amp;quot;&amp;gt;&lt;br /&gt;
First name: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;fname&amp;quot; size=&amp;quot;30&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/br&amp;gt;&lt;br /&gt;
Date of birth: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;bdate&amp;quot; size=&amp;quot;30&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;
&lt;/div&gt;

&lt;p&gt;Now on the server-side in our file "process.wbsp":&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;Hello $WBV[fname], your date of birth is $WBV[bdate]!&lt;/div&gt;

&lt;h2&gt;Sending emails&lt;/h2&gt;
&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;First we have the HTML form:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;email.wbsp&amp;quot;&amp;gt;&lt;br /&gt;
Your email: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;email&amp;quot; size=&amp;quot;30&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Subject: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;subject&amp;quot; size=&amp;quot;30&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Body &amp;lt;textarea cols=&amp;quot;30&amp;quot; rows=&amp;quot;5&amp;quot; name=&amp;quot;emailbody&amp;quot;&amp;gt;&amp;lt;/textarea&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;submit&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;
&lt;/div&gt;

&lt;p&gt;Now we make the WhizBase email:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
wb_command=P&lt;br /&gt;
wb_mailserver=out.mail.com&lt;br /&gt;
wb_to=info@mydomain.com&lt;br /&gt;
wb_subject=$wbv{subject}&lt;br /&gt;
wb_from=$wbv{email}&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&lt;br /&gt;
$wbv[emailbody]&lt;br /&gt;
&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;
&lt;/div&gt;

&lt;p&gt;By defining the data of the server in the code before, we have code which will send an email to the defined destination.&lt;/p&gt;

&lt;h2&gt;Working with the Database &lt;/h2&gt;
&lt;p&gt;The simplest DB that WhizBase work with is Microsoft Access "mdb". But it also work with any common database.&lt;/p&gt;

&lt;p&gt;To query all the fields in an access recordset we use this code:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
WB_Command=q&lt;br /&gt;
WB_Basename=biblio.mdb&lt;br /&gt;
WB_Rcdset=titles&lt;br /&gt;
WB_TempName=$default$
&lt;/div&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;Writing files&lt;/h2&gt;

&lt;p&gt;Finally, how to write files using WhizBase?&lt;br /&gt;
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:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
wb_destination=today_is.txt&lt;br /&gt;
wb_redirect=today_is.txt&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;br /&gt;
Today is $WBFN[DATE]
&lt;/div&gt;

&lt;p&gt;When you open this file you will find today's date.&lt;/p&gt;

&lt;h2&gt;What is next&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;For more information email me at: NurAzije [at] Gmail [dot] com Or visit WhizBase official site at www.whizbase.com&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-8847606575227803913?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='related' href='http://www.experts-exchange.com/articles/Programming/Languages/Scripting/Whizbase-fast-tutorial.html' title='Whizbase fast tutorial'/><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/8847606575227803913/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2010/03/whizbase-fast-tutorial_04.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/8847606575227803913'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/8847606575227803913'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2010/03/whizbase-fast-tutorial_04.html' title='Whizbase fast tutorial'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-8992318795343452780</id><published>2010-02-15T13:05:00.002+01:00</published><updated>2010-02-15T13:20:13.750+01:00</updated><title type='text'>Creating live visitors counter (who is online) in WhizBase</title><content type='html'>&lt;p&gt;Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase.&lt;/p&gt;

&lt;p&gt;In this article I assume you have read my previous articles and know some WhizBase basics, as how to query, insert or update a DB.&lt;/p&gt;

&lt;p&gt;If you did not read my previous articles:&lt;br /&gt;
&lt;a href="http://whizbase-scripting-language.blogspot.com/2009/06/uploading-files-to-your-webpage.html"&gt;Uploading files to your webpage in WhizBase&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://whizbase-scripting-language.blogspot.com/2009/06/make-database-driven-website-in-3-steps.html"&gt;Make a database driven website in 3 steps&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://whizbase-scripting-language.blogspot.com/2009/07/simple-form-validation-with-wbsp.html"&gt;Simple form validation with WBSP&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://whizbase-scripting-language.blogspot.com/2009/11/make-password-strength-meter-in.html"&gt;Make a Password Strength Meter in WhizBase&lt;/a&gt;&lt;br /&gt;
&lt;a href="http://whizbase-scripting-language.blogspot.com/2010/02/creating-small-address-book-application.html"&gt;Creating a small address book application in WhizBase&lt;/a&gt;&lt;br /&gt;
&lt;/p&gt;

&lt;p&gt;We will need one table in the DB where we will keep the data of the recent visitors. The principle goes like this:
&lt;br /&gt;&lt;br /&gt;
1-      the visitor enters the site&lt;br /&gt;
2-      we check the IP address of visitor and check if he is in the DB&lt;br /&gt;
3-      if the IP exists, we update its record with current time&lt;br /&gt;
4-      if not, we insert a new record&lt;br /&gt;
5-      To include to visitor in our counting he must check-in in last 5 seconds
&lt;/p&gt;

&lt;h2&gt;The database table used by the tutorial&lt;/h2&gt;
&lt;p&gt;I will not go through the SQL or the Access file creation, I will just describe what we need in the DB. We will need one table named "visitor". It will have the following fields:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
Id as integer(9) autoincrement primary key&lt;br /&gt;
IP as char(100) unique and not null&lt;br /&gt;
Lastvisit as DateTime
&lt;/div&gt;

&lt;p&gt;I will create it in access DB and name the file visitor.mdb, and the table as visitor.&lt;/p&gt;

&lt;p&gt;The id is auto increment field, so we will not need it in our code, it is just for table indexing and maintenance. The IP is the IP address of the visitor, and it must be unique and not null. Lastvisit will be a date and time of the last visit.&lt;/p&gt;

&lt;h2&gt;If exists include update, else include add&lt;/h2&gt;
&lt;p&gt;As we stated in the introduction, we will need to check if the visitor is online or not, and then include the file which makes the needed changes on the DB.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
WB_BaseName=visitor.mdb&lt;br /&gt;
WB_RcdSet=visitor&lt;br /&gt;
WB_Query=IP=$WBE{REMOTE_ADDR}&lt;br /&gt;
WB_Command=Q&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;br /&gt;
$WBIF[$WBP[RC]&amp;gt;0|&lt;br /&gt;
$WBGETURL[update.wbsp?wbf_id=$WBF[id]]&lt;br /&gt;
|&lt;br /&gt;
$WBGETURL[add.wbsp?wbf_ip=$WBE[REMOTE_ADDR]]&lt;br /&gt;
]&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;Number of visitors online&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
$wbsr[show.sr]&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;
&lt;/div&gt;

&lt;p&gt;In this code we have started WhizBase file and queried the DB «visitor.mdb», the table «visitor» where the IP address is gained by «$wbe[remote_addr]».  «$wbe» is the function for reading operating system environment variable, in this case variable remote_addr that exist in every web server. I have named this file as «onvisitors.wbsp».&lt;/p&gt;

&lt;p&gt;Now using «$wbif» we check if count of records is greater than zero by «$wbp[rc]&gt;0», and if  true we call the file «update.wbsp» and pass the parameter wbf_id with the id of current record. If false («$wbp[rc]=0») we call the file «add.wbsp» and pass the WBF_IP value.&lt;/p&gt;

&lt;p&gt;Finally we call a sub-report file which will give us the result of how many users are online using «$wbsr» function.&lt;/p&gt;

&lt;h2&gt;I have visited your site before, update me&lt;/h2&gt;
&lt;p&gt;This is a description of the file that will be used to update the DB and record the time of last visit.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
WB_BaseName=visitor.mdb&lt;br /&gt;
WB_RcdSet=visitor&lt;br /&gt;
WB_Command=U  &lt;br /&gt;
WB_UID=ID&lt;br /&gt;
WB_FORCED=wbf_lastvisit=$WBFN{FDT(yyyy-mm-dd hh:mm:ss)}&lt;br /&gt;
&amp;lt;!--WB_Begintemplate--&amp;gt;&lt;br /&gt;
&lt;/div&gt;

&lt;p&gt;This is a simple update script, we connect to «visitor.mdb», open table «visitor» and make an update to the unique field id and force one more parameter named «wbf_lastvisit» with the current date and time in the suitable format.&lt;/p&gt;

&lt;p&gt;In previous paragraph we've explained why we call this file and give it wbf_id as a parameter, and you know WhizBase needs a unique field to update the record by. So we defined field "id" as the unique one. Then we needed the current time, so we have forced one more parameter (same as if we have sent it by form, but for security reasons we've used this method). The parameter is wbf_lastvisit which has the value of current date and time formatted in full year-month-day hour:minutes:seconds format.&lt;/p&gt;

&lt;p&gt;Since we need no feedback from this file, it will do the update and return an empty string (a blank page).&lt;/p&gt;

&lt;h2&gt;This is my first visit to your site, insert me&lt;/h2&gt;
&lt;p&gt;We use this simple code to call the file «insert.wbsp» and pass the parameter with the IP of the visitor. &lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
WB_BaseName=visitor.mdb&lt;br /&gt;
WB_RcdSet=visitor&lt;br /&gt;
WB_Command=A&lt;br /&gt;
WB_FORCED=wbf_lastvisit=$WBFN{FDT(yyyy-mm-dd hh:mm:ss)}&lt;br /&gt;
&amp;lt;!--WB_Begintemplate--&amp;gt;&lt;br /&gt;
&lt;/div&gt;

&lt;p&gt;There is no need to describe anything in this code, it is the same as previous one but for addition (wb_command=A).&lt;/p&gt;

&lt;h2&gt;So how many visitors are on my site now?&lt;/h2&gt;
&lt;p&gt;Finally, we will look into the file «show.sr» which we include as a sub-report in our WBSP file.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
WB_BaseName=visitor.mdb&lt;br /&gt;
WB_RcdSet=visitor&lt;br /&gt;
WB_Query=lastvisit&amp;gt;$WBDCALC{$WBFN{FDT(yyyy-mm-dd hh:nn:ss)}|10|s|-}&lt;br /&gt;
WB_Command=Q&lt;br /&gt;
&amp;lt;!--WB_Begintemplate--&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;Number of users&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
There is $WBP[RC] users now online!&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;/div&gt;

&lt;p&gt;In our sub-report we make a query to the DB «visitor.mdb» on table «visitor» and get all records where the last visit is greater than current time minus ten seconds. This will return all IPs  that where recorded for the last ten seconds.&lt;/p&gt;

&lt;p&gt;$wbdcalc makes arithmetic operations on dates, so we pass the current date and time and number of intervals to be added to or subtracted from it. We use «s» for interval (as seconds) and defined 10 of them, and finally we defined subtraction using the minus operator.&lt;/p&gt;

&lt;p&gt;We will show just the number of visitors that are currently online, but not their IPs, so we need only «$wbp[rc]» which we have described before in this article.&lt;/p&gt;

&lt;h2&gt;What's next&lt;/h2&gt;
&lt;p&gt;That is how we record/count/show the number of visitors in the last 10 seconds using the WhizBase. Now, you can call «onvisitors.wbsp» with AJAX every 5-8 seconds from any page on your site and you'll have 100% real data and will not depend on the refresh of the page.&lt;/p&gt;

&lt;p&gt;For more information email me at: NurAzije [at] Gmail [dot] com
Or visit WhizBase official site at &lt;a href="www.whizbase.com"&gt;www.whizbase.com&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-8992318795343452780?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/8992318795343452780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2010/02/creating-live-visitors-counter-who-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/8992318795343452780'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/8992318795343452780'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2010/02/creating-live-visitors-counter-who-is.html' title='Creating live visitors counter (who is online) in WhizBase'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-8713354428871182939</id><published>2010-02-15T12:45:00.003+01:00</published><updated>2010-02-15T13:04:46.602+01:00</updated><title type='text'>Creating a small address book application in WhizBase</title><content type='html'>&lt;p&gt;In this tutorial I will aim to show you how simple is making a small application in WhizBase, how to add, remove and update data in the DB. I will make a small address book application where you can add, browse, update and remove addresses. &lt;/p&gt;

&lt;p&gt;I will use a MS Access DB (.mdb file), but you can apply this tutorial for any DB you want, there is no significant difference, and the concept is the same.&lt;/p&gt;

&lt;p&gt;We will make one default page which will show us all the records sorted alphabetically, then two files for update, one for delete and two for addition.&lt;/p&gt;

&lt;h2&gt;Creating the DB&lt;/h2&gt;
&lt;p&gt;I will not go through the SQL or the Access file creation, I will just describe what we need in the DB. We will need one table named  contacts . It will have the following fields:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
Id as integer(9) autoincreament primary key&lt;br /&gt;
Firstname as char(255)&lt;br /&gt;
Lastname as char(255)&lt;br /&gt;
Tel as char(255)&lt;br /&gt;
InsertionDate as DateTime&lt;br /&gt;
&lt;/div&gt;

&lt;p&gt;Whatever DB type you use, you will need these fields, so create the table and let s begin. I have created my contacts.mdb access DB file.&lt;/p&gt;

&lt;h2&gt;General file «default.wbsp»&lt;/h2&gt;
&lt;p&gt;This file will connect to the DB and select all the contacts sorted alphabetically by first name:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
WB_BaseName=contacts.mdb&lt;br /&gt;
WB_Command=Q&lt;br /&gt;
WB_RcdSet=contacts&lt;br /&gt;
WB_maxrec=20&lt;br /&gt;
WB_Order=Firstname&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Address Book&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;h1&amp;gt;Address Book&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;table width='80%' border='0' cellpadding='5' cellspacing='0'&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;ID&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;First Name&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Last Name&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Telephone&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Insert Date&amp;lt;/th&amp;gt;&amp;lt;th colspan='2'&amp;gt;Action&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;!--WB_BeginDetail--&amp;gt;&lt;br /&gt;
 &amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;$wbf[id]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$wbf[Firstname]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$wbf[Lastname]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$wbf[Tel]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$wbf[InsertionDate]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href='edit.wbsp?wbf_id=$wbf[id]'&amp;gt;Edit&amp;lt;/a&amp;gt; &amp;lt;a href='delete.wbsp?wbf_id=$wbf[id]'&amp;gt;Delete&amp;lt;/td&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;!--WB_EndDetail--&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;a href='add.htm'&amp;gt;Add Contact&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt; &lt;/div&gt;

&lt;p&gt;In our first file we connect to the DB file contacts.mdb, which is located in the same folder as default.wbsp. In WhizBase we give instructions for DB connection at the beginning, so we first make [FormFields] section which is the start of the file header. We specify some parameters, WB_BaseName is the path of the DB, WB_Command will be Q as for Query. WB_maxrec will be 20 records, we want our address book to paginate the records in 20 rows each page. And WB_Order will be Firstname, because we want to sort the report alphabetically by Firstname.&lt;/p&gt;

&lt;p&gt;&amp;lt;!--WB_BeginTemplate--&amp;gt; will mark the end of the file header. We now make the design of our address book. &amp;lt;!--WB_BeginDetail--&amp;gt; and &amp;lt;!--WB_EndDetail--&amp;gt; are used to loop through the query results. WhizBase brings you the data automatically, so you do not need to assign any variables or arrays. You need just to put the data placeholders in the code.&lt;/p&gt;

&lt;p&gt;$wbf[fieldname] is the placeholder, as the system loops through the query result, for each row we take the value of the field name we want to show, in our case we are showing the id, firstname, lastname, tel and insertiondate.&lt;/p&gt;

&lt;p&gt;We made three links, one for edit, another two for delete and add commands. Take a look at the edit and delete links, you will see that we are giving a wbf_id parameter. We will need that later.&lt;/p&gt;

&lt;h2&gt;Adding records Form «add.wbsp»&lt;/h2&gt;
&lt;p&gt;To add records we need a plain HTML form, so we will not use any WhizBase in this file, but take a look at the input names.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Add contact&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;Adding Contact&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;form action='addc.wbsp' method='post'&amp;gt;&lt;br /&gt;
Frstname : &amp;lt;input type='text' name='wbf_firstname' value='' /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Lastname : &amp;lt;input type='text' name='wbf_lastname' value='' /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Telephone : &amp;lt;input type='text' name='wbf_tel' value='' /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;input type='submit' value='Add' /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;/div&gt;

&lt;p&gt;WhizBase picks up all parameters sent by POST or GET method and put them in one server array. Some parameters have a special meaning for WhizBase, any parameter beginning with wbf_ will be treated as a DB entry, it uses these parameters as values for comparison for Query and Delete commands (WHERE clause in SELECT statement), and as values to be entered into the table for Update and Add commands. This simplifies working with DB's, no need to write complex and long queries, WhizBase makes it automatically.&lt;/p&gt;

&lt;p&gt;As we want to add 3 information in the DB - firstname, lastname and telephone, we use three parameters wbf_firstname, wbf_lastname and wbf_tel as inputs. Fields ID and insertiondate will be added automatically.&lt;/p&gt;

&lt;p&gt;Save this file as add.htm, and let's move to file addc.wbsp that does all the adding work.&lt;/p&gt;

&lt;h3&gt;Adding records «addc.wbsp»&lt;/h3&gt;
&lt;p&gt;Every server side scripting language can receive inputs from visitors and process data from the DB. That makes them better than client side scripting languages. WhizBase as a server side scripting language also receive inputs, and processes them.&lt;/p&gt;

&lt;p&gt;In add.htm we collected 3 parameters from visitor and sent them using post method. All the data we want to add to database have wbf_ prefix in the name, so WhizBase will process and filter them automatically. Let us look at this code and see how WhizBase make an insert to the DB:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]
WB_BaseName=contacts.mdb&lt;br /&gt;
WB_RcdSet=contacts&lt;br /&gt;
WB_Command=A&lt;br /&gt;
WB_FORCED=wbf_InsertionDate=$WBFN{DATE}&lt;br /&gt;
&amp;lt;!--WB_Begintemplate--&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;Adding Contact&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
Contact have been added.&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;a href='default.wbsp'&amp;gt;View Addressbook&amp;lt;/a&amp;gt; &amp;lt;a href='add.htm'&amp;gt;Add new contact&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;
&lt;/div&gt;

&lt;p&gt;In this file we have connected to the DB by wb_basename, selected the table contacts with wb_rcdset, and gave an addition command by setting wb_command = A where &amp;#171;A&amp;#187; stands for Addition.&lt;/p&gt;

&lt;p&gt;WhizBase took the 3 parameters with prefix wbf_ and added them in the table automatically, but we have two more fields in the contacts table - &amp;#171;id&amp;#187; and &amp;#171;InsertionDate&amp;#187;. The &amp;#171;id&amp;#187; is set in the table as autonumber so it will be set automatically, but &amp;#171;InsertionDate&amp;#187; we must add somehow, and we do not want visitor to change it. We could add it as a fourth parameter, but that would not be very safe, because visitors might find the ways to change it. So, since we want to add it on server-side safely, we use wb_forced variable, which will force any parameter we want (in this case wbf_InsertionDate) and ignore the value(s) sent by form. $wbfn{date} is used to pass the system date and time.
&lt;/p&gt;

&lt;h2&gt;Deleting records &amp;#171;delete.wbsp&amp;#187;&lt;/h2&gt;
&lt;p&gt;Deleting records in WhizBase is very easy and secure, you cannot delete all records at once, and you cannot inject the query or hack it. And it is very similar to addition.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
WB_BaseName=contacts.mdb&lt;br /&gt;
WB_RcdSet=contacts&lt;br /&gt;
WB_Command=D&lt;br /&gt;
WB_UID=ID&lt;br /&gt;
WB_Redirect=default.wbsp&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;br /&gt;
&lt;/div&gt;

&lt;p&gt;Do you remember the parameter we sent in the delete link, &amp;#171;wbf_id&amp;#187; we will need it now. To delete a record by id we need that id so we submit it automatically by wbf_id.&lt;/p&gt;

&lt;p&gt;There are three new commands in this code, let go through them. &amp;#171;wb_command=d&amp;#187; is telling the server to execute delete command where &amp;#171;D&amp;#187; stands for delete. &amp;#171;wb_uid&amp;#187; is the command where we specify the name of the unique field (different value for every record) that we will use to prevent deletion of more than one record at the time. In our case it is field &amp;#171;ID&amp;#187;, and without this, command delete is not safe enough. Finally &amp;#171;wb_redirect&amp;#187; is a simple redirect command where we tell the server to redirect visitor to the location we want. In our case we want the application to go back to the address book.&lt;/p&gt;

&lt;h2&gt;Edit a record Form &amp;#171;edit.wbsp&amp;#187;&lt;/h2&gt;
&lt;p&gt;When we want to edit a record we first need to show the values we have in the DB for specific record, so we can edit it and then save it. So,  we have two steps with the DB here, the first is to select the record we want to edit from the DB, after editing it we need to save the changes in the DB.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
WB_BaseName=contacts.mdb&lt;br /&gt;
WB_Command=Q&lt;br /&gt;
WB_RcdSet=contacts&lt;br /&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;Edit contact&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;h1&amp;gt;Edit Contact&amp;lt;/h1&amp;gt;&lt;br /&gt;
&amp;lt;form action='editc.wbsp' method='post'&amp;gt;&lt;br /&gt;
Frstname : &amp;lt;input type='text' name='wbf_firstname' value='$wbf[firstname]' /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Lastname : &amp;lt;input type='text' name='wbf_lastname' value='$wbf[lastname]' /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Telephone : &amp;lt;input type='text' name='wbf_tel' value='$wbf[tel]' /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;input type='hidden' name='wbf_id' value='$wbf[id]' /&amp;gt;&lt;br /&gt;
&amp;lt;input type='submit' value='Save' /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;
&lt;/div&gt;

&lt;p&gt;This is very simple code, we talked about all its elements before, just notice that we did not use wb_maxrec because we always edit one record at the time, and we also did not use wb_order for the same reason.&lt;/p&gt;

&lt;p&gt;For editing the record we will need to send its &amp;#171;id&amp;#187; so we use &amp;lt;input type='hidden' name='wbf_id' value='$wbf[id]' /&amp;gt;.  &lt;/p&gt;

&lt;p&gt;WhizBase selected our record automatically by the id we provided in the link with wbf_id.&lt;/p&gt;

&lt;h2&gt;Save edited record &amp;#171;editc.wbsp&amp;#187;&lt;/h2&gt;
&lt;p&gt;The last file we will do in this article is editc.wbsp where we will save the record. In the previous file we have sent all needed parameters by POST with a prefix &amp;#171;wbf_&amp;#187;.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]&lt;br /&gt;
WB_BaseName=contacts.mdb&lt;br /&gt;
WB_RcdSet=contacts&lt;br /&gt;
WB_Command=U  &lt;br /&gt;
WB_UID=ID&lt;br /&gt;
WB_Redirect=default.wbsp&lt;br /&gt;
&amp;lt;!--WB_Begintemplate--&amp;gt;
&lt;/div&gt;

&lt;p&gt;In this file we have just one new command &amp;#171;WB_Command=U&amp;#187; which tells the server to make an Update. Note that for Update command we must set the WB_UID.&lt;/p&gt;

&lt;p&gt;With this we have finished our simple address book application in WhizBase. As you can see, in WhizBase it is very easy to work with the DB, and you do not need to know any SQL or make any queries.&lt;/p&gt;

To download the all files in this example please visit this link:
&lt;a href="http://www.ziddu.com/downloadlink/7482469/small_address.rar"&gt;http://www.ziddu.com/downloadlink/7482469/small_address.rar&lt;/a&gt;

For more information email me at: NurAzije [at] Gmail [dot] com
Or visit WhizBase official site at &lt;a href="www.whizbase.com"&gt;www.whizbase.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-8713354428871182939?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/8713354428871182939/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2010/02/creating-small-address-book-application.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/8713354428871182939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/8713354428871182939'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2010/02/creating-small-address-book-application.html' title='Creating a small address book application in WhizBase'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-5012655988750850192</id><published>2009-11-19T15:11:00.000+01:00</published><updated>2009-11-19T15:12:20.909+01:00</updated><title type='text'>Make a Password Strength Meter in WhizBase</title><content type='html'>&lt;p&gt;Today the Internet is everywhere, we use it in everything, it is the buzz word of our time. When it first began it was just an experiment, a network for exchanging some data between universities, no one used it for exchanging private data.&lt;/p&gt;

&lt;p&gt;Today it is 90% social powered network, everyone have a profile on some social website, a lot of people have money accounts on the net, some others have galleries and private data. So now we have to take care about security, how to secure our data, we need a good password, most people use «trustno1» or «000000» or their birth dates. That is not a good password, any cracking engine can guess that one.&lt;/p&gt;

&lt;b&gt;Making a good password&lt;/b&gt;
&lt;p&gt;A good password must have numbers, alphabetic characters (upper and lower case), other characters, they must be in a random order and must not mean anything. So do not use English words with meaning or some number combinations of something in your life.&lt;/p&gt;

&lt;p&gt;A good example for a good password is ubXr-z9)7mn: we have upper and lower case letters, we have numbers and we have other characters. This password is nearly impossible to guess.&lt;/p&gt;

&lt;p&gt;We will show you how to make password strength meter in WhizBase. The concept is easy, the user enters the password, we check it if it has all the 4 elements in it and give strength value back.&lt;/p&gt;

&lt;p&gt;So let us start.&lt;/p&gt;

&lt;b&gt;Give me your password&lt;/b&gt;
&lt;p&gt;We will make a simple HTML form where we will ask the user to insert a username and a password. It is the standard form you can find everywhere on the net. Let us name it «index.htm»&lt;/p&gt;

&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&amp;lt;title&amp;gt;WhizBase Password Strength Meter&amp;lt;/title&amp;gt;&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;form action=&amp;quot;'chpwd.wbsp'&amp;quot; method=&amp;quot;'post'&amp;quot;&amp;gt;&lt;br /&gt;
Username : &amp;lt;input type=&amp;quot;'text'&amp;quot; name=&amp;quot;'username'&amp;quot; value=&amp;quot;''&amp;quot;&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Password : &amp;lt;input type=&amp;quot;'password'&amp;quot; name=&amp;quot;'pwd'&amp;quot; value=&amp;quot;''&amp;quot;&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;'submit'&amp;quot; value=&amp;quot;'check&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;

&lt;p&gt;Some notes about this code, we always use POST method in the form to hide our password when sending it through the web, we need the username to check if the password contains the username in it. We will create the file «chpwd.wbsp» which will make the checking for us.&lt;/p&gt;

&lt;b&gt;Mambo Jumbo stuff of the code&lt;/b&gt;
&lt;p&gt;Before we start we need to write down what we want to check and how we mark the password strength. I will make a list of things we need to check and every point have 1 point mark. So if the password passes 3 out of 6 it will have 50% strength.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The length of the password must be at least 8 characters&lt;/li&gt;
&lt;li&gt;The password must not contain the username in it&lt;/li&gt;
&lt;li&gt;The password must contain numbers&lt;/li&gt;
&lt;li&gt;The password must contain special characters&lt;/li&gt;
&lt;li&gt;The password must contain lower case letters&lt;/li&gt;
&lt;li&gt;The password must contain upper case letters&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now lets begin with the code, save it in 'chpwd.wbsp':&lt;/p&gt;


&lt;p&gt;$wbsetv[strength|0]&lt;br /&gt;
  $wbif[$wblen[$wbv[pwd]]&amp;gt;7|$wbsetv[strength|$wbcalc[$wbgetv[strength]+1]]|]&lt;/p&gt;
&lt;p&gt;$wbif[$WBCSTR[$wbv[pwd]|$wbv[username]|T]&amp;gt;0||$wbsetv[strength|$wbcalc[$wbgetv[strength]+1]]]&lt;/p&gt;
&lt;p&gt;$wbsetv[avail|F]&lt;br /&gt;
  $WBSPLIT[0,1,2,3,4,5,6,7,8,9|numbers|,]&lt;/p&gt;
&lt;p&gt;$wbsetv[count|0]&lt;/p&gt;
&lt;p&gt;$wbwhile[$wbgetv[count]&amp;lt;=$wbalen[numbers]|$wbif[$WBCSTR[$wbv[pwd]|$wbgetv[numbers($wbgetv[count])]|T]&amp;gt;0|$wbsetv[avail|T]|]$wbsetv[count|$wbcalc[$wbgetv[count]+1]]]&lt;/p&gt;
&lt;p&gt;$wbif[$wbgetv[avail]=&amp;quot;T&amp;quot;|$wbsetv[strength|$wbcalc[$wbgetv[strength]+1]]|]&lt;/p&gt;
&lt;p&gt;$wbsetv[avail|F]&lt;br /&gt;
  $WBSPLIT[!,#,$,%,&amp;amp;amp;,/,(,),=,?,*,@,;,:,-,_|schars|,]&lt;/p&gt;
&lt;p&gt;$wbsetv[count|0]&lt;/p&gt;
&lt;p&gt;$wbwhile[$wbgetv[count]&amp;lt;=$wbalen[schars]|$wbif[$WBCSTR[$wbv[pwd]|$wbgetv[schars($wbgetv[count])]|T]&amp;gt;0|$wbsetv[avail|T]|]$wbsetv[count|$wbcalc[$wbgetv[count]+1]]]&lt;/p&gt;
&lt;p&gt;$wbif[$wbgetv[avail]=&amp;quot;T&amp;quot;|$wbsetv[strength|$wbcalc[$wbgetv[strength]+1]]|]&lt;/p&gt;
&lt;p&gt;$wbsetv[avail|F]&lt;br /&gt;
  $WBSPLIT[q,w,e,r,t,z,u,i,o,p,a,s,d,f,g,h,j,k,l,y,x,c,v,b,n,m|scase|,]&lt;/p&gt;
&lt;p&gt;$wbsetv[count|0]&lt;/p&gt;
&lt;p&gt;$wbwhile[$wbgetv[count]&amp;lt;=$wbalen[scase]|$wbif[$WBCSTR[$wbv[pwd]|$wbgetv[scase($wbgetv[count])]|T]&amp;gt;0|$wbsetv[avail|T]|]$wbsetv[count|$wbcalc[$wbgetv[count]+1]]]&lt;/p&gt;
&lt;p&gt;$wbif[$wbgetv[avail]=&amp;quot;T&amp;quot;|$wbsetv[strength|$wbcalc[$wbgetv[strength]+1]]|]&lt;/p&gt;
&lt;p&gt;$wbsetv[avail|F]&lt;br /&gt;
  $WBSPLIT[Q,W,E,R,T,Z,U,I,O,P,A,S,D,F,G,H,J,K,L,Y,X,C,V,B,N,M|ucase|,]&lt;/p&gt;
&lt;p&gt;$wbsetv[count|0]&lt;/p&gt;
&lt;p&gt;$wbwhile[$wbgetv[count]&amp;lt;=$wbalen[ucase]|$wbif[$WBCSTR[$wbv[pwd]|$wbgetv[ucase($wbgetv[count])]|T]&amp;gt;0|$wbsetv[avail|T]|]$wbsetv[count|$wbcalc[$wbgetv[count]+1]]]&lt;/p&gt;
&lt;p&gt;$wbif[$wbgetv[avail]=&amp;quot;T&amp;quot;|$wbsetv[strength|$wbcalc[$wbgetv[strength]+1]]|]&lt;br /&gt;
  Your password's strength is $wbcalc[$wbcalc[$wbgetv[strength]/6]*100]% $wbgetv[strength]&lt;/p&gt;


&lt;b&gt;Let us speak English&lt;/b&gt;
&lt;p&gt;Now let me explain what we have done. First we have created a variable which will contain the strength value, starting with zero because we assume the password is not good and then check every point and give a mark for success. We've done that with $wbsetv[strength|0] which means «WhizBase set a variable named strength with value 0».&lt;/p&gt;

&lt;p&gt;Now we start with checking, first we check if the password length is more than 7 characters.&lt;/p&gt;



$wbif[&lt;br /&gt;
$wblen[$wbv[pwd]]&amp;gt;7&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
$wbsetv[strength|&lt;br /&gt;
$wbcalc[$wbgetv[strength]+1]&lt;br /&gt;
]&lt;br /&gt;
]


&lt;p&gt;We say «If the length of 'pwd' variable greater is than 7 then add 1 point to the variable strength. Else do nothing.&lt;/p&gt;

&lt;p&gt;Now we want to check if the password contains the username in it.
Again we use $WBIF  «If number of occurences of the username variable in the pwd variable is greater than 0, then do nothing» (do not add a point), because there is at least one occurence and there should be none, «else add one point to the variable strength» because there is no user name in pwd.&lt;/p&gt;

&lt;p&gt;Now we will make our script a little bit more complex, since we need to check if there are  number characters in the password. To do so, we will define the numbers array and loop through the elements and check if any of them exists in the password string.&lt;/p&gt;


&lt;p&gt;$wbsetv[avail|F]&lt;br /&gt;
  $WBSPLIT[0,1,2,3,4,5,6,7,8,9|numbers|,]&lt;/p&gt;
&lt;p&gt;$wbsetv[count|0]&lt;/p&gt;
&lt;p&gt;$wbwhile[$wbgetv[count]&amp;lt;=$wbalen[numbers] |  $wbif[$WBCSTR[$wbv[pwd]|$wbgetv[numbers($wbgetv[count])]|T]&amp;gt;0 |$wbsetv[avail |T]|]&lt;br /&gt;
  $wbsetv[count|$wbcalc[$wbgetv[count]+1]]&lt;br /&gt;
  ]&lt;/p&gt;
&lt;p&gt;$wbif[&lt;br /&gt;
  $wbgetv[avail] = 'T'&lt;br /&gt;
  |&lt;br /&gt;
  $wbsetv[strength|&lt;br /&gt;
  $wbcalc[$wbgetv[strength]+1]&lt;br /&gt;
  ]&lt;br /&gt;
  |&lt;br /&gt;
  ]&lt;/p&gt;


&lt;p&gt;At the beginning we suppose that there are no numbers, and give a value F as False for variable avail. Using wbsplit with the string «0,1,2,3,4,5,6,7,8,9» we make an array named numbers with the separator «,». This is a very cool way to create arrays in WhizBase. There are another ways but I prefer this one.&lt;/p&gt;

&lt;p&gt;Now to loop through the array, we will need a counter so we will create a variable «count» with initial value of 0.&lt;/p&gt;

&lt;p&gt;We will loop through the array while the condition (counter value &lt;= length of the array) is true. In the loop we check with wbif function if there is an occurrence of the array element's value in the password string. If we find at least one we will set the variable avail as True «T». And off course we do not want our loop to go infinite, so we increase the value of the counter variable.  After the loop is ended we check if our «avail» variable is True, which means that our password string has numbers in it, and add one point to «strength» variable (if true), else we do nothing.  Now we repeat the same thing for special characters, lower case letters and upper case letters.  I will not go through that code because it is the same as this one.  Finally we will calculate the percentage of the strength, which is simple mathematical equation:&lt;/p&gt;


&lt;br /&gt;
$wbcalc[$wbcalc[$wbgetv[strength]/6]*100]


&lt;p&gt;We calculate the result of the strength points divided by maximum points (in our case it is 6), and then we multiply the result with 100 to get a percentage result.&lt;/p&gt;

&lt;p&gt;And here we have a script that will tell us how powerful is our password.&lt;/p&gt;

&lt;p&gt;For more information email me at: NurAzije [at] Gmail [dot] com
Or visit WhizBase official site at &lt;a rel="nofollow" href="http://www.whizbase.com/" target="_blank"&gt;www.whizbase.com&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-5012655988750850192?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/5012655988750850192/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/11/make-password-strength-meter-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/5012655988750850192'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/5012655988750850192'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/11/make-password-strength-meter-in.html' title='Make a Password Strength Meter in WhizBase'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-389167632735368092</id><published>2009-07-15T14:06:00.003+02:00</published><updated>2009-07-15T14:13:06.715+02:00</updated><title type='text'>15.07.2009 - Version 5.0.13 released</title><content type='html'>&lt;p&gt;WhizBase have released a new version of its engine today, including one new operator, operator modulus to $WBCALC function.&lt;/p&gt;

&lt;p&gt;$WBCALC function gives the results of mathematical expressions. This make it easier in the code to distinguish between literally written 1+2 or mathematically waiting for a result.&lt;/p&gt;

&lt;p&gt;For more information please visit &lt;a href="http://www.whizbase.com/eng/download_whizbase.wbsp" title="WhizBase download page"&gt;WhizBase download page&lt;/a&gt; or contact me at NURAZIJE [AT] GMAIL [DOT] COM&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-389167632735368092?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/389167632735368092/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/07/15072009-version-5013-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/389167632735368092'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/389167632735368092'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/07/15072009-version-5013-released.html' title='15.07.2009 - Version 5.0.13 released'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-6096138971248460727</id><published>2009-07-15T09:09:00.002+02:00</published><updated>2009-07-15T09:14:59.092+02:00</updated><title type='text'>PowerPack Wizards version 1.0.3 released</title><content type='html'>&lt;p&gt;PowerPack is a User-friendly interface for WhizBase development. Using WhizBase PowerPack user can build all required files - WhizBase Query Form and WhizBase Report (WBSP file) without need to work directly with WhizBase Engine (using WhizBase parameters, tags and functions). Whole system is built to simplify and ease development of dynamic, database-driven web content. WhizBase Engine simplifies access to the database(s) on the web (either Internet or intranet) and WhizBase PowerPack makes configuring WhizBase easy and simple.&lt;/p&gt;
&lt;p&gt;WhizBase Query Form Wizard will help you build web page that calls WBSP file. That is the page that has a HTML form which calls selected WBSP file(s) and sends the parameters entered by visitor and predefined by webmaster. Building this page is easy. It starts with opening database and record source (database table or query) and everything else is done by few mouse clicks following the program's instructions.&lt;/p&gt;
&lt;p&gt;Final product of this procedure is source code of web page (HTML), which can easily be modified (or merged with ordinary HTML document) using any web-authoring tool.&lt;br /&gt;
Procedure for building Reports is exactly the same. WhizBase report (WBSP file) produced by wizard is a web page (in HTML format) that is used by WhizBase Engine to model the result of the action performed by visitor.&lt;/p&gt;
&lt;p&gt;In the new release WhizBase team changed the default form action for quick search from $wbe[script_name] to $wbe[path_info]. Some web servers replace $wbe[script_name] with virtual path to wbsp.exe even when it is not running in CGI mode. $wbe[path_info] always returns path to WhizBase script (.wbsp) file.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-6096138971248460727?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/6096138971248460727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/07/powerpack-wizards-version-103-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/6096138971248460727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/6096138971248460727'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/07/powerpack-wizards-version-103-released.html' title='PowerPack Wizards version 1.0.3 released'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-110070687592696057</id><published>2009-07-07T15:27:00.000+02:00</published><updated>2009-07-07T15:28:00.067+02:00</updated><title type='text'>Version 5.0.12 released</title><content type='html'>&lt;p&gt;WhizBase have released a new version of its engine today, including one new variable and three functions. &lt;/p&gt;

&lt;h2&gt;WB_DBLock&lt;/h2&gt;
&lt;p&gt;This variable defines what type of record locking will be used when opening the recordset. If you are not sure what type of record locking you need do not change the default value which is (A) automatic. This function will solve the problem of database damages when more than one update occers in the same time. You can use pessimistic or optimistic, you can leave it automatic or use unspecified.&lt;/p&gt;

&lt;h2&gt;WBCSTR&lt;/h2&gt;
&lt;p&gt;A new function which returns a the count of instances of a string in another. This will help in easier string manipulations in cobination with other string manipulation functions WhizBase is getting a good collection of powerful functions.&lt;/p&gt;

&lt;h2&gt;WBESC&lt;/h2&gt;
&lt;p&gt;When transmitting data in URLs we have problems with URL encoding. This function will solve that problem, it will encode every value, and all can be returened back with its sister function WBUNESC.&lt;/p&gt;

&lt;h2&gt;WBUNESC&lt;/h2&gt;
&lt;p&gt;When transmitting data in URLs we have problems with URL encoded data. This function will decode any data encoded by WBESC, WBVC or WBFC functions.&lt;/p&gt;

&lt;p&gt;For more information please visit &lt;a href="http://www.whizbase.com/eng/download_whizbase.wbsp" title="WhizBase download page"&gt;WhizBase downlod page&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-110070687592696057?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/110070687592696057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/07/version-5012-released.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/110070687592696057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/110070687592696057'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/07/version-5012-released.html' title='Version 5.0.12 released'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-5843793167356208844</id><published>2009-07-02T14:42:00.010+02:00</published><updated>2009-07-02T15:01:17.425+02:00</updated><title type='text'>Simple form validation with WBSP</title><content type='html'>&lt;p&gt;Have you ever looked to the DB of your registered users, if you do you will find a lot of garbage data. Emails that does not exist, unreal names and comments with spam or empty fields.&lt;/p&gt;

&lt;p&gt;In this tutorial I will show you how to make a simple validation form using WhizBase. With it you can not control and validate everything, but at least you will filter some data. It will learn you some basics and it will save you a lot of deleting work.&lt;/p&gt;

&lt;h2&gt;The boring part&lt;/h2&gt;
&lt;p&gt;The most boring part for a developer is HTML, generally programmers and developers do not like designing. If you ask me, I hate HTML coding, I mostly give it to my wife, she likes it and I work on the more complicated things «Server Side Scripting».&lt;br /&gt;
Let us make a file named as «form.htm» and put in it the next code:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
&amp;lt;html&amp;gt;&lt;br&gt;
&amp;lt;head&amp;gt;&lt;br&gt;
&amp;lt;title&amp;gt;Feedback Form&amp;lt;/title&amp;gt;&lt;br&gt;
&amp;lt;/head&amp;gt;&lt;br&gt;
&amp;lt;body&amp;gt;&lt;br&gt;
&amp;lt;form action="validation.wbsp" method="post"&amp;gt;&lt;br&gt;
&amp;lt;fieldset&amp;gt;&amp;lt;legend&amp;gt;Enter your information in the form below.&amp;lt;/legend&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt;
First Name:&amp;lt;br/&amp;gt;&lt;br&gt;
&amp;lt;input type="text" name="fname" size="20" maxlength="40" /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt;
Last Name:&amp;lt;br/&amp;gt;&lt;br&gt;
&amp;lt;input type="text" name="lname" size="40" maxlength="60"/&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt;
E-Mail:&amp;lt;br /&amp;gt;&lt;br&gt;
&amp;lt;input type="text" name="email" size="40" maxlength="60"/&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt;
Comments:&amp;lt;br /&amp;gt;&lt;br&gt;
&amp;lt;textarea name="comments" cols="40" rows="7"&amp;gt;&amp;lt;/textarea&amp;gt;&lt;br&gt;
&amp;lt;/fieldset&amp;gt;&lt;br&gt;
&amp;lt;div align="center"&amp;gt;&amp;lt;input type="reset" /&amp;gt;&lt;br&gt;
&amp;lt;input type="submit" name="submit" value="Submit" /&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;
&amp;lt;/form&amp;gt;&lt;br&gt;
&amp;lt;/body&amp;gt;&lt;br&gt;
&amp;lt;/html&amp;gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;Pay attention to the action attribute in the form tag, we will send our data to validation.wbsp which is our WhizBase Server Pages file.&lt;/p&gt;

&lt;h2&gt;The Need For Speed Part&lt;/h2&gt;
&lt;p&gt;Have you ever played Need For Speed, I like the Lamborghini car, that is a great game. WhizBase is something like that to other languages when you are developing a site. You do not need a lot of time to create it.&lt;/p&gt;

&lt;p&gt;Let us create the file validation.wbsp and put WhizBase code in it:&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;
[FormFields]
WB_Required=email,fname,lname,comments&lt;br&gt;
&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;br&gt;
 &amp;lt;html&amp;gt;&lt;br&gt;
&amp;lt;head&amp;gt;&lt;br&gt;
&amp;lt;title&amp;gt;Validate Form&amp;lt;/title&amp;gt;&lt;br&gt;
&amp;lt;/head&amp;gt;&lt;br&gt;
&amp;lt;body&amp;gt;&lt;br&gt;
$wbif[$wbcstr[$wbv[email]|@]&amp;gt;1|Please insert your email address&amp;lt;br /&amp;gt;|]&lt;br&gt;
$wbsplit[$wbv[email]|email_array|@]&lt;br&gt;
$wbif[$wblen[$wbgetv[email_array(0)]]&amp;gt;0||Your have inserted an invalid email format&amp;lt;br /&amp;gt;]&lt;br&gt;
$wbif[$wblen[$wbgetv[email_array(1)]]&amp;gt;0||Your have inserted an invalid email format&amp;lt;br /&amp;gt;]&lt;br&gt;
$wbsplit[$wbgetv[email_array(1)]|domain|.]&lt;br&gt;
$wbif[$wblen[$wbgetvdomain(0)]]&amp;gt;0||Your have inserted an invalid email format&amp;lt;br /&amp;gt;]&lt;br&gt;
$wbif[($wblen[$wbgetvdomain(1)]]&amp;gt;1) and ($wblen[$wbgetvdomain(1)]]&amp;lt;5)||Your have inserted an invalid email format&amp;lt;br /&amp;gt;]&lt;br&gt;
&amp;lt;/body&amp;gt;&lt;br&gt;
&amp;lt;/html&amp;gt;&lt;br&gt;
&lt;/div&gt;

&lt;p&gt;We need to check 4 values (email,fname,lname,comments) if they are empty or not, then in case if they are empty we will give an error. We simply use one command, it is WB_Required which will check all the fields required, if one of them are empty it gives an error.&lt;/p&gt;

&lt;p&gt;[FormFields] is a command where we tell the server to start processing essential data for WhizBase file, and we close it with &amp;lt;!--WB_BeginTemplate--&amp;gt; command.&lt;/p&gt;

&lt;p&gt;When we come to email validation we need to validate its format also, it is important if it is in the format of:&lt;br /&gt;
Charactars_and_Numbers@ Charactars_and_Numbers.4_to_2_Charactars_and_Numbers&lt;/p&gt;

&lt;p&gt;From this we need to check:&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;does it have @ symbol, and only once.&lt;/li&gt;
&lt;li&gt;Before @ symbol we need to have at least 1 character&lt;/li&gt;
&lt;li&gt;Do we have a dot in the second part which we split with it the rest to two parts.&lt;/li&gt;
&lt;li&gt;The first part must be at least one character&lt;/li&gt;
&lt;li&gt;The second part must have at least 2 characters and at most 4&lt;/li&gt;
&lt;/ul&gt;
&lt;/p&gt;

&lt;p&gt;Let us start playing cards. &lt;br /&gt;
First we need to check if there is and only one @ symbol in the email, if it is false we give an error. This is done with if statement and wbcst function.&lt;/p&gt;

&lt;p&gt;$wbif[$wbcstr[$wbv[email]|@]=1|| Please insert your email address&amp;lt;br /&amp;gt;]&lt;/p&gt;
&lt;p&gt;The IF:&lt;br&gt;
$wbif[ CONDITION | IF TRUE | IF FALSE] 
&lt;/p&gt;

&lt;p&gt;
The CONDITION:&lt;br /&gt;
$wbcstr[ STRING | STRING TO LOOK FOR] = 1
&lt;/p&gt;

&lt;p&gt;In WhizBase get and post methods are considered the same, if you send a variable using post method or send it using get method all the variables are created on the fly as a special set.&lt;br /&gt;
Considering that we will just get these variables with $wbv[var_name].&lt;/p&gt;

&lt;p&gt;The STRING:
$wbv[email]
&lt;/p&gt;

&lt;p&gt;Second we split the email address to two parts and put it in an array, then we check the first part if it is at least 1 character.&lt;/p&gt;

&lt;p&gt;$wbsplit[$wbv[email]|email_array|@]&lt;br /&gt;
$wbif[$wblen[$wbgetv[email_array(0)]]&gt;0||Your have inserted an invalid email format&amp;lt;br /&amp;gt;]
&lt;/p&gt;

&lt;p&gt;We notice WBSPLIT function, it takes a string and an array name and a separator, creates the array and fill the string's part separated by the separator.&lt;/p&gt;

&lt;p&gt;$wbsplit[ STRING | ARRAY_NAME | SEPARATOR]&lt;/p&gt;

&lt;p&gt;In the second line we get the length of the first part by using WBLEN and check if it is more than zero characters.&lt;/p&gt;

$wblen[ STRING ]

&lt;p&gt;To access a variable we need to use the WBGETV function which accesses variables and arrays, and we call the first part of the array with (0) - in WBSP 0 is the first element in the array.&lt;/p&gt;

&lt;p&gt;The STRING:&lt;br&gt;
$wbgetv[ VARIABLE_NAME ]&lt;/p&gt;

&lt;p&gt;Third we make the same process to the other part with the dot, and we have a simple email validation done.&lt;/p&gt;

&lt;p&gt;For more information email me at: 
NurAzije [at] Gmail [dot] com&lt;br&gt;
Or visit WhizBase official site at &lt;a href="www.whizbase.com"&gt;www.whizbase.com&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-5843793167356208844?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/5843793167356208844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/07/simple-form-validation-with-wbsp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/5843793167356208844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/5843793167356208844'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/07/simple-form-validation-with-wbsp.html' title='Simple form validation with WBSP'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-7383572038925798073</id><published>2009-06-09T15:08:00.006+02:00</published><updated>2009-06-09T15:56:53.823+02:00</updated><title type='text'>Uploading files to your webpage</title><content type='html'>&lt;p&gt;Have you ever wanted to upload your files to your hosting, or have you ever want to make a simple images gallery and let the visitors upload their pictures.&lt;/p&gt;

&lt;p&gt;In this tutorial I will show you how simple is to write a script for uploading your files online with no need for complicated web scripts like ASP or PHP.&lt;/p&gt;

&lt;h2&gt;Simple HTML uploading form&lt;/h2&gt;
&lt;p&gt;If you want to upload images you will need a form, it is made in pure HTML, it is the page where you click on Browse and select the file you want to upload. Fortunately HTML provides us with the elements, we do not need to write scripts to list files on our computer.&lt;/p&gt;

&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
  &amp;lt;title&amp;gt;Upload an Image&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"&amp;gt;&lt;br /&gt;
&amp;lt;form action="upload.wbsp" method="post" ENCTYPE="multipart/form-data"&amp;gt;&lt;br /&gt;
Select file (*.jpg;*.gif - max. 100KB): &amp;lt;input type="file" name="image" size="20"&amp;gt; &amp;lt;input type="submit" name="sButt" value="Upload"&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;/div&gt;

&lt;p&gt;Let take a look in some important elements in this code, first the Form tag, without it our code will not work, the form tag must contain information like action (where to send the file data), method (there is two general methods – get and post, when sending files use post) and enctype(there is a lot of encoding types, multipart/form-data is used for uploading files).&lt;/p&gt;
&lt;p&gt;Also we need to use the input of type file, that input is the one  which let us browse our computer files. Last is the submit input, it is the button which people will click to send or upload the file.&lt;/p&gt;

&lt;p&gt;Save this file as index.htm and put it in a folder so you do not loose it.&lt;/p&gt;

&lt;h2&gt;The butter of the work&lt;/h2&gt;
&lt;p&gt;Now we want to make the server-side file, it is the script which takes the file, save it on the hosting server.&lt;/p&gt;
&lt;div style="padding: 10px; color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51);"&gt;[FormFields]&lt;br /&gt;
WB_AllowMultipart=T&lt;br /&gt;&lt;br /&gt;

[Upload]&lt;br /&gt;
WB_Disallow=![jpg,gif,png,bmp]&lt;br /&gt;
WB_UploadDir=/&lt;br /&gt;
WB_Overwrite=T&lt;br /&gt;
WB_MaxFSize=102400&lt;br /&gt;&lt;br /&gt;

&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
  &amp;lt;title&amp;rt;File uploaded&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body bgcolor="#ffffff" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"&amp;gt;&lt;br /&gt;
Your file have been uploaded!&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;
&lt;/div&gt;

&lt;p&gt;OK, do not get afraid, it is not complicated as it seems, I will explain every line before the HTML tag, make your self a coffee or a tea and sit down and read.&lt;/p&gt;

&lt;p&gt;I will explain first what is used as a scripting language, it is WhizBase Server Pages, WhizBase is simple but powerful scripting language, it is made for non-programmers to simplify creating database-driven websites without the need for high experience in high-level programming languages.&lt;/p&gt;

&lt;p&gt;Now in English, it is a scripting language for everyone, simple and easy for you to use. Let me show you how.&lt;/p&gt;

&lt;h3&gt;The header section&lt;/h3&gt;
&lt;p&gt;Every WBSP page have a header, it is a place where we put some information needed by the server, everything we write in this section will not appear in our page. This section contains the variables that are essential for processing WBSP file. Here you put information about the database, recordset, template, error template, log file, redirection, etc.&lt;/p&gt;

&lt;p&gt;In the code we have [FormFields] which is a tag giving a notice for WhizBase engine to start interpreting the main commands of the WBSP file. &lt;/p&gt;

&lt;p&gt;Then we have WB_AllowMultipart = T this variable controls if the current WBSP page will accept uploaded files (sent by client using multipart form). If this variable is set to TRUE WhizBase will accept and process uploaded files. This is a security measure so WBSP process the files sent to the write direction.&lt;/p&gt;

&lt;p&gt;Second tag is [Upload] which is giving a notice for WBSP engine to start receiving information about the uploading process.  Now ask your self, do you want viruses and a porn dialer on your server, if no you need to use WB_Disallow=![jpg,gif,png,bmp], we do not want users to upload any file, we only want images, so we disallow every file which does not have one of these extensions.&lt;/p&gt;

&lt;p&gt;Where do you want to put your pictures, you need an upload directory, so we use WB_UploadDir=/, this variable defines the name of the directory on the server where WhizBase will save files uploaded using current WBSP file. &lt;/p&gt;

&lt;p&gt;Do you want to overwrite your image? WB_Overwrite=T is a variable which defines if the file with same name that already exists on the server will be overwritten by newly uploaded file. We will use T as True. If you define it as F (False) WhizBase will generate a unique file name for the new one and save it like that.&lt;/p&gt;

&lt;p&gt;If you do not want visitors to block your server, you need to limit their file's upload size, so you use WB_MaxFSize=102400 which is a variable which defines the maximum size (in bytes) of a single file that can be uploaded using current WBSP file. We have putted 102400 bytes.&lt;/p&gt;

&lt;p&gt;Finally we put &amp;lt;!--WB_BeginTemplate--&amp;gt; to let the server know that now we are starting the body section, where we put our HTML code and what we want to show for visitors.&lt;/p&gt;

&lt;p&gt;As you see, we can control everything when uploading files. And that how you simply make an upload form which works without the need of PHP or ASP.&lt;/p&gt;

&lt;p&gt;For more information about WhizBase please visit &lt;a href='http://www.whizbase.com'&gt;WhizBase site&lt;/a&gt; or contact me on NurAzije [at] Gmail [dot] com.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-7383572038925798073?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/7383572038925798073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/06/uploading-files-to-your-webpage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/7383572038925798073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/7383572038925798073'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/06/uploading-files-to-your-webpage.html' title='Uploading files to your webpage'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8430794678869775075.post-4055089735493515794</id><published>2009-06-03T08:57:00.015+02:00</published><updated>2009-06-09T15:55:15.101+02:00</updated><title type='text'>Make a database driven website in 3 steps</title><content type='html'>&lt;p&gt;Today every company had to have a website, it is something like having a telephone number or a company address. A lot of companies do not have yet a budget for making a website, thedy think it is very expensive, and they are right. If you use a web developer in Europe you will need a couple of thousands of Euros to make a simple website to present your company.&lt;/p&gt;
&lt;p&gt;In this article I will give a simple tutorial how to publish your database report without the need for a web-developer, something simple but yet very powerful, with your Microsoft access database. &lt;/p&gt;
&lt;p&gt;This method is best way for web designers, who know how to make a web page in HTML, but do not know how to connect it with the database, without using PHP or ASP.&lt;/p&gt;
&lt;h2&gt;First step: create your report page&lt;/h2&gt;
&lt;p&gt;To show your report online, you will need a database access file and a HTML file which will show the report or the query results.&lt;/p&gt;
&lt;p&gt;We will create the databse in Microsoft access, I will create a database and name it as biblio and create a table and name it Titles, we will make these fields:&lt;/p&gt;
&lt;ul&gt;&lt;li&gt;ID as number data type which will be our primary key also.&lt;/li&gt;
&lt;li&gt;Name as text data type&lt;/li&gt;
&lt;li&gt;Publisher as text data type&lt;/li&gt;
&lt;li&gt;PublishYear as text data type&lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;I will fill it with some data and save it, and we have a database file.&lt;/p&gt;
&lt;p&gt;If you have a design for your report you will need to slice it and make a HTML page, you can use GIMP on linux or Photoshop on windows, then use any HTML editor or text editor to make the HTML code.&lt;/p&gt;
&lt;p&gt;I will use a simple example using WhizBase Server Pages (WBSP) to develop this report. WBSP is a very powerful tool for publishing databases online with a very simple code, it is not like classic web programing languages.&lt;/p&gt;
&lt;h3&gt;Create the header:&lt;/h3&gt;
&lt;p&gt;Every WBSP page have a header, it is a place where we put some information needed by the server, everything we write in this section will not apear in our page. This section contains the variables that are essential for processing WBSP file. Here you put information about the database, recordset, template, error template, log file, redirection, etc. We will simply say for the server to connect to our access database and select a table, list for example 10 records only and make a pagiation.&lt;/p&gt;
&lt;div style="color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51); padding:10px;"&gt;1 [FormFields]&lt;br /&gt;
2 wb_basename=biblio.mdb&lt;br /&gt;
3 wb_rcdset=Titles&lt;br /&gt;
4 WB_Command=Q&lt;br /&gt;
5 WB_MaxRec=10&lt;br /&gt;
6 &amp;lt;!--WB_BeginTemplate--&amp;gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="font-weight: bold;"&gt;[FormFields]&lt;/span&gt; is the starting tag for the section, when the server sees this code it will start receiving our commands. &lt;span style="font-weight: bold;"&gt;wb_basename=biblio.mdb&lt;/span&gt; is our database file, I have putted our database in the same folder as my HTML file so I am calling it directly. The server will look for the file name what ever we give as a path for it after &lt;span style="font-style: italic;"&gt;wb_basename&lt;/span&gt; and connect to the database file. To specify which table we will select we use &lt;span style="font-weight: bold;"&gt;wb_rcdset=Titles&lt;/span&gt;, as you see I will select the table &lt;span style="font-style: italic;"&gt;Titles&lt;/span&gt;.  We told the server which database file to connect and which table to select, now we need to tell it what to do, and in our case is query, using the command &lt;span style="font-style: italic;"&gt;WB_Command&lt;/span&gt; we give it a value &lt;span style="font-style: italic;"&gt;Q&lt;/span&gt; and we did it. Finally we want to limit our results, let us show 10 records by page. We can skip this line and it will list the whole table, but what if we have a table with 10 000 records or more, do you really want to show it all in one page? So we will use &lt;span style="font-weight: bold;"&gt;WB_MaxRec=10&lt;/span&gt; and that is all what we need. Now give the server a simple comment like command &lt;span style="font-weight: bold;"&gt;&amp;lt;!--WB_BeginTemplate--&amp;gt;&lt;/span&gt; which says to the server begin interpreting the template.&lt;/p&gt;
&lt;h3&gt;Create the body (template):&lt;/h3&gt;
&lt;p&gt;After creating  the header setion we have to create the template, and that is very simple, it is our HTML code with simple lines of WBSP code where we want to show our data.&lt;/p&gt;
&lt;div style="color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51); padding:10px;"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;Simple DB report page&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;th&amp;gt;ID&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Name&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Publisher&amp;lt;/th&amp;gt;&amp;lt;th&amp;gt;Publish Year&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;!--WB_BeginDetail--&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;$wbf[ID]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$wbf[Name]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$wbf[Publisher]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;$wbf[PublishYear]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;!--WB_EndDetail--&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;div align='center'&amp;gt;$wbnavigator&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;/div&gt;
&lt;p&gt;In the template we want to view ten records in a table and then show the navigation bar where users can go next or previus page to see more records. &lt;/p&gt;
&lt;p&gt;The most important code in this template is &lt;span style="font-weight: bold;"&gt;&amp;lt;!--WB_BeginDetail--&amp;gt;&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;&amp;lt;!--WB_EndDetail--&amp;gt;&lt;/span&gt; which represents the start and the end of the looping function, everything between these two will loop for as many times as records we want to show. If the query returned 10 records it will loop for ten times. Between these two commands we will show the records using the function &lt;span style="font-weight: bold;"&gt;$wbf[fieldname]&lt;/span&gt;, in our case we are viewing four fields in the table and WBSP will replace every one with the field value in the table.&lt;/p&gt;

&lt;p&gt;Finally we have &lt;span style="font-weight: bold;"&gt;$wbnavigator&lt;/span&gt; which will generate for us the navigation links automatically, this is a very cool command, we do not need to calculate anything, it will automatically create as many pages as we need.&lt;/p&gt;

&lt;p&gt;We will save all this as defaut.wbsp file, where the extension wbsp will say to the server that this file have a WBSP code in it.&lt;/p&gt;

&lt;h3&gt;Second step: Create a search form&lt;/h3&gt;
&lt;p&gt;In the previous step we have made a report page, now we need a filtering form, for example what if we do not want to view all the records, we want to view just records for the publish year 2007.&lt;/p&gt;

&lt;p&gt;Create a file named as «search.htm», in this file we will not need any WBSP code, we will only make a HTML form with inputs and a submit. We only must take into account one thing, how we will name our inputs, because WBSP have its automatic mechanism for catching get and post values.&lt;/p&gt;

&lt;div style="color: rgb(255, 255, 255); font-family: Verdana; background-color: rgb(51, 51, 51); padding:10px;"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;Search filter file&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;form action='default.wbsp' method='post'&amp;gt;&lt;br /&gt;
 ID &amp;lt;input type='text' name='wbf_id' /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Name &amp;lt;input type='text' name='wbf_name' /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Publisher &amp;lt;input type='text' name='wbf_publisher' /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Publish Year &amp;lt;input type='text' name='wbf_publishyear' /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;input type='submit' value='submit' /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;
&lt;/div&gt;

&lt;p&gt;As you can see we have used a pure HTML, but we have also used a specific naming method in the input names. &lt;span style="font-weight:bold;"&gt;WBF_ID&lt;/span&gt; is &lt;span style="font-style:italic;"&gt;WBF_&lt;/span&gt; + &lt;span style="font-style:italic;"&gt;ID&lt;/span&gt; where &lt;span style="font-style:italic;"&gt;WBF_&lt;/span&gt; is WhizBase prefix and &lt;span style="font-style:italic;"&gt;ID&lt;/span&gt; is the name of the table field. WhizBase catches all the get and post data and filters them, then takes all the post and get data with prefix &lt;span style="font-style:italic;"&gt;WBF_&lt;/span&gt; and sends them to the query.&lt;/p&gt;

&lt;p&gt;For example if we put a value 2000 in «Publisher Year» input, it will be a post value in the variable &lt;span style="font-style:italic;"&gt;wbf_publisheryear&lt;/span&gt;, WhizBase will filter it and catch it because it has &lt;span style="font-style:italic;"&gt;wbf_&lt;/span&gt; prefix and then send it as a database query as «publisheryear = 2000».&lt;/p&gt;

&lt;h2&gt;Third Step: Upload everything online&lt;/h2&gt;
&lt;p&gt;Finally, we have a form file, a report file and a database. We do not need anything else. Now just upload the 3 files online in the same folder on a server which supports Whizbase or install Whizbase on your Windows server and put these files on the server and you will have a ready report and a filtering system.&lt;/p&gt;

&lt;p&gt;For more information about WhizBase or to download it for free you can visit &lt;a href="http://www.whizbase.com" target="_blank"&gt;http://www.whizbase.com&lt;/a&gt; or contact me at NURAZIJE [at] GMAIL [dot] COM&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8430794678869775075-4055089735493515794?l=whizbase-scripting-language.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://whizbase-scripting-language.blogspot.com/feeds/4055089735493515794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/06/make-database-driven-website-in-3-steps.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/4055089735493515794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8430794678869775075/posts/default/4055089735493515794'/><link rel='alternate' type='text/html' href='http://whizbase-scripting-language.blogspot.com/2009/06/make-database-driven-website-in-3-steps.html' title='Make a database driven website in 3 steps'/><author><name>Ashraf Gheith</name><uri>http://www.blogger.com/profile/04184130853454371576</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
