Information Technology Services Header

Web Office

The following form will insert information into an Oracle database.  You must have space on Oracle as well as tables set up before you can use this function of FormServlet.  Please contact the Web Office for more information on setting up your database.

SELECTING FROM A DATABASE:

 

Student ID

 

Student Name

 

Exam Score

 

 

HTML:

<HTML>
< BODY BGCOLOR="#FFFFFF">
< FORM method="post" action="http://www.umsl.edu/servlet/FormServlet">
< input type="hidden" name="USER" value="example">
< input type="hidden" name="URLhead" value="/webstuff/htdocs/computing/FormServlet/examples/templates/ select.head">
< input type="hidden" name="URLbody" value="/webstuff/htdocs/computing/FormServlet/examples/templates/ select.body">
< input type="hidden" name="URLfoot" value="/webstuff/htdocs/computing/FormServlet/examples/templates/ select.foot">
< input type="hidden" name="SQLFile" value="select.sql">
< input type="text" name="Student_Id" size="30"> Student ID (required)<BR>
< input type="text" name="Name" size="30"> Student Name<BR>
< input type="text" name="Score" size="30"> Exam Score<BR>
< input type="submit" value="select">
< input type="reset" value="reset">
< /FORM>
< /FONT>
< /BODY>
< /HTML>

FILES REQUIRED:
form6.html
user_data.example
select.sql
select.head
select.body
select.foot
thanks.html

EXPLANATION OF TAGS:

<HTML>

    Basic HTML tag.  Tells the browser that the tags are using HTML.

<BODY BGCOLOR="#FFFFFF">

    Basic HTML tag.  Starts the BODY of the page.  Formats background color to WHITE.

<FONT FACE="Verdana, Tahoma, Helvetica, Arial" SIZE="-1">

    Changes the FONT on the page to be one of these. 

<FONT COLOR="#CC0000"><B>SELECT FROM A DATABASE:</B></FONT>

    Changes the font color to UMSL red, and makes the "SELECT FROM A DATABASE:" bold.

<FORM METHOD="post" ACTION="http://www.umsl.edu/servlet/FormServlet">

    Required element for UMSL forms.  Tells form to use FormServlet to process form information.

<input type="hidden" name="USER" value="example">

    This tag tells FormServlet which user is accessing the database.  The value of the USER tag points to a file hidden on the server with the database information: which database, login, password.  This file also contains the path to the SQL files for this user.  You must contact someone in the Web Office to have this USER profile set up according to your database space.  See the link above in the FILES REQUIRED section for an example of this file.

<input type="hidden" name="URLhead" value="/webstuff/htdocs/computing/FormServlet/examples/templates/
select.head">

    Once the select statement has been sent to the database, a web page will be returned with the results of your query.  The URLhead is the first section of HTML that will be returned to you.  See the link above in the FILES REQUIRED section for an example of this file.

<input type="hidden" name="URLbody" value="/webstuff/htdocs/computing/FormServlet/examples/templates/
select.body">

    Once the select statement has been sent to the database, a web page will be returned with the results of your query.  The URLbody is the section of HTML that actually contains the query results.  FormServlet will cycle through the URLbody until all results are included.  This allows you to pull multiple results from the same database.  See the link above in the FILES REQUIRED section for an example of this file.

<input type="hidden" name="URLfoot" value="/webstuff/htdocs/computing/FormServlet/examples/templates/
select.foot">

    Once the select statement has been sent to the database, a web page will be returned with the results of your query.  The URLfoot is the last section of HTML that will be returned to you, once the URLbody section has been completed.  See the link above in the FILES REQUIRED section for an example of this file.

<input type="hidden" name="SQLFile" value="select.sql">

    The USER tag specifies where your SQL statements are filed, but this tag specifies which SQL statement to use.  The SQL file is simply a text file with your SQL statement.  See the link above in the FILES REQUIRED section for an example of this file.

<input type="text" name="Student_Id" size="30"> Student ID<BR>
< input type="text" name="Name" size="30"> Student Name<BR>
< input type="text" name="Score" size="30"> Exam Score<BR>

    These tags create the blank spaces on the form.  Please note that these tags are NOT required, and do NOT need to be completed for the form to submit.

<INPUT TYPE="submit" VALUE="select">

    This tag creates the SUBMIT button.  Clicking this button will send the form values to FormServlet, and return the message "Form Successfully Submitted" to the user.  Whatever text is used as the VALUE will be what appears on the button.

<INPUT TYPE="reset" VALUE="reset">

    This tag creates the RESET button.  Clicking this button will clear all answers from the form.  Whatever text is used as the VALUE will be what appears on the button.

</FORM>

    This tag tells the browser that the form is done, and needs to be placed at the END of your form.  No form variables AFTER this tag will work.

</BODY>

    Basic HTML tag.  This tag tells the browser that the BODY section of the page is closed.

</HTML>

    Basic HTML tag.  Tells the browser that the HTML is finished.