Home > Support > Resource Center > Web Publisher 4 Documentation > Adding Information to Databases

Adding Information to Databases


Web Sites are a great way to gather information. With the askSam Web Publisher you can save information from an HTML form directly into an askSam database. For example, job applications can be filled out over the Internet and saved into an askSam database.


You can choose whether the databases you create are searchable via the Internet, or if they are only available on your intranet or LAN. Using askSam you can edit, query, and create reports from the data you collect via the Internet.


You use a standard HTML form to gather your information. When the user clicks a button to submit the form, it is automatically saved in an askSam database. Each field in your HTML form is saved as a field in the askSam database. Sample HTML Forms are available on our Web Site at http://www.asksam.com.


To Create an askSam Database:


1. Use askSam 4.0 or askSam 4.0 Professional to create the database (choose FILE - NEW).


2. In the first document of your askSam database, enter the instructions and hypertext links you want users to see after their information is added. After adding information from an HTML form, the Web Publisher automatically displays the first document in the askSam file where the information was added.


3. Place the database in a directory on your Web server. If you do not want the saved information to be accessible from the Web, do not put it in the default data directory for the Web Publisher, and do not alias this database.



To Add Information to an askSam Database:

1. Create an HTML form with the text, fields, and layout you want.

2. There are several elements you must include when defining the form:

     Ÿ The "Method" must be set to a POST.

     Ÿ The "Action" must be set to the URL of the AS_Web4.exe

     Ÿ A hidden Command field must have the value "Add"

     Ÿ A hidden File field must contain the path and askSam file where you want to save the data.

     Ÿ A hidden Entry Form field can specify the name of the askSam Entry Form.


Note: If no Entry Form is specified, the contents of the form are still added, but they are not inserted into an Entry Form - the field names from your HTML form are submitted with the data in your askSam file.


Below is sample HTML code for a form that will be saved to an askSam database:


<HTML>

<BODY>

 

<FORM method=POST ACTION="/scripts/as_web4.exe">

<INPUT type=hidden Name="Command" value="Add">

<INPUT type=hidden Name="File" value="c:\ask_base\user.ask">

<INPUT type=hidden Name="EntryForm" value="Email Form">

 

Name: <INPUT size=45 name=Name><BR>

Email: <INPUT size=45 name=Email><BR>


<INPUT type=submit value=Submit>

</FORM>

 

</BODY>

</HTML>


This sample code would look like this in your browser:



When the user enters information and chooses the Submit button, the information is stored in the askSam database specified in the HTML form. After the information is added, askSam automatically displays the first Document in the askSam file where the information was added.


When submitted to your askSam database, the data would look like this:



In this example, the contents of the NAME and EMAIL  fields are inserted into the NAME and EMAIL fields in the askSam Entry Form named "Email Form". The askSam Entry Form also automatically inserts the date and time when the data is added.  If the Entry Form does not contain fields that correspond to the field names in your Web form, the data WILL NOT be saved.


If you remove the line:

<INPUT type=hidden Name="EntryForm" value="Email Form" >

from the form, the data will be added to the askSam file, but not inserted into the Entry Form. All field names from the HTML form are saved into the askSam file, but no formatting or other fields from the askSam form are included.


Submitting to an askSam database without specifying an Entry Form:



Command Modifiers for Adding Data with Forms




Return to Table of Contents

Quick Downloads

 

How people use askSam

 

Surf Report Newsletter

Subscribe today to receive our FREE monthly newsletter. The Surf Report includes tips, articles, and information about new releases, upgrades, free utilities, and special promotions. Sign up today!


Read Back Issues »
 

"askSam is an essential part of my software tool chest. I can research and collect data from anywhere and any source. Once it is in askSam I can edit, rearrange, organize, and search the information easily. Then I can present it and make it totally useful for other people via the web or CD. Fantastic!"

-- Valda Hilley, Author, Literary Agent, Teaching Consultant, Pack rat, and President, Convergent Press, Ltd.

 

Seaside Software Inc. DBA askSam Systems, 121 S Jefferson Street, Perry FL 32347
Telephone: 800-800-1997 / 850-584-6590   •   Email: info@askSam.com   •   Support: http://www.askSam.com/central.asp
© Copyright 1985-2012   •   Privacy Statement