All the Examples on this page can be found in the php sample site
Displaying the Form & Receiving Information:
The Form Looks like:
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:
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.
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.
next lesson - Updating Records