West Wind Web Connection for Visual FoxPro
The following examples all generate output dynamically using Visual FoxPro and Web Connection. If you're testing these examples on your own Web server make sure that the CGITEST.PRG sample program is running in a Visual FoxPro session before selecting any options on this form!

Simple CGI Request

The following link shows what kind of information is returned to your code from a Web Server CGI request. Using the wwCGI object you can find out about server and browser info as well as form variables defined on an HTML form.

Simple CGI Test


Data Query Example

The following example form allows you to query a time and billing database by selecting a client name and date range. To see a list of clients and pick one from the list click on the Client Name header button.

Client Name:

From: 
  To: 


Multi-Select Data Query Example

Here's the same example using a multi-select list box. Note for demo purposes this list is hardcoded with names (see above Client list example for creating dynamic list boxes)...

Client Name:


Data Input and Interactive HTML Forms

The Guest Book application demonstrates use of interactive HTML forms containing embedded Visual FoxPro Expressions. This form can take input from the user and save and update the values in a table. The main page uses an HTML template page stored on disk. The page contains the table fields and several expressions to display all data without having to generate the HTML in code.


Embedded HTML Example

The following example uses no Code on the Visual FoxPro end, but instead embeds Visual FoxPro code directly into the HTML page.

Client Name:


E-Mail Sample

The following example shows off Web Connection's ability to send SMTP email using the CGIServer's SendMail method. Enter your e-mail address below and Web Connection will reply by sending you a form email message...

Enter your email address :


Rotating Banner

This link displays a different image link everytime a page is refreshed. The wwBanner class that comes with Web Connection makes this job extremely easy. For fun, add your own image reference and a link and add it on the rotation list for this sample..."

Show rotating image page


HTTP Cookie Test

The following link assigns an HTTP Cookie with a lifetime of the Browser session. Cookies are great for keeping track of users when transactions spans multiple pages or forms. This example simply creates a Cookie and displays the value. If cookies are supported by your Browser the value should stay the same on each refresh, unless you stop and restart your browser.

Cookie Test


Authentication

This link pops up an authorization dialog and forces you to log in. If the correct passwords are used you're allowed to see the page. If you visit this page again, you will not be asked for a password again, since the Authentication information is passed back by the Web server for each request once validated.

Authentication Test


Maintainence Tasks


Session Maintainence

The following functions allow you to start and stop Web Connection sessions, but require at least one session to be already running. In order for this to work properly you have to set #DEFINE VFPPATH "D:\VFP\VFP.EXE -t CGIMAIN.PRG" at the top of wwMaint.prg to match your VFP path and main program file name to start up a new session.


Powered by Web Connection