gotFusion.com....... Where your adventure begins
Showcase your website at Fusion GalleriesNetObjects Fusion 7 Websites Portal

 


 

On This Page

Display Form

Insert Into Database

All the Examples on this page can be found in the php sample site

 

In This Tutorial

MySQL--Getting Started

SELECT Statements

Forms

On All Forms

Forms-Add

Forms-Update

Forms-Delete

Combo Boxes

 

Displaying the Form & Receiving Information:

 

The Form Looks like:

Add a Pet form

Note that the pet must be owned by an existing GotFusion team pet. To enforce this, we use a pulldown box populated with the TGF pets in the database.  The pet must also be of a type that we already have in the database, so it is also a pulldown selection to the type of pet we are adding.

The form action for to add a pet looks like this:

Form Settings

How to populate a Pulldown Box from the database is demonstrated on the Combination Box Page.


Inserting the Information into the Database:

Once the form is filled out, and the submit button is pressed, the form action will call the processing page, in this case, that would be padd2.php.  The padd2.php page will be loaded and the data in the form will be evaluated. If it is ok, then the new pet will be added to the table.  If not, an error will appear.

padd2 is short and clean

The page is clean and simple, which is why the call-script method  tends to be used with very complex forms and database applications that require heavy processing or data cleanup.

The PHP insert code verifies the data & inserts into the database

next lesson - Updating Records

View the PREVIOUS page in this tutorial

Return to the TOP of this page

View the NEXT page in this tutorial


|  Fusion  |  Web Design  |  Hosting  |  Resources  |  gotFusion Store  | 

Problems with this page?  

All content copyright © 2002 gotFusion LLC.  The name gotFusion and the gotFusion ® logo are registered trademarks of gotFusion LLC
Copyright, legal notice & privacy statement