gotFusion.com....... Where your adventure begins
Antons Video ProductionsNetObjects Fusion 7 Websites Portal

 


 

On This Page

Call Script Form Method

Self Calling Form Method

 ...How do I get information into & out of my database?

In This Tutorial

MySQL--Getting Started

SELECT Statements

Forms

On All Forms

Forms-Add

Forms-Update

Forms-Delete

Combo Boxes

We have already looked at how to view information stored in a database (see SELECTS page). But how do we input information (add new records), edit what we already have, or even delete information we no longer need?

AND.... how do we do it using PHP/MySQL AND NOF??? By using a Form.

Overview of FORMs

PHP handles forms in 2 basic methods:

  1. The Form calls another page (or .php field) that performs all the processing of the data entered.... adding to database, updating or deleting from database OR
  2. The form calls itself to do the processing (=$PHP_SELF). Although a brief description of how this works, it is a recursive method that can be very difficult to debug and maintain.


Call Script (or "call another page") Method

 The page with the page calls another page to do the processing

The form is displayed on the screen, and the user enters the information. When the "submit" button is pressed, another .php page is called that performs the actual data cleanup, validation, and subsequent database update.

This is the more common method of processing the infomration entered on the form and entering into the database. It is particularly useful when keeping track of user sessions or when performing complex

The Pets secion of the GotFusion .nft contains the PHP_SELF method of adding, updating, and deleting records from the database.

Click on page in image to learn more...

You can click on a page area in the image to learn more about that page in the example site. Tell me more about Calling Script method!


PHP_SELF (or "self calling") Method

Recursive form processing. The page with the form calls itself to do the processing. In the form settings, you enter either the name of the page your form or <?=$PHP_SELF?>. This will cause the page to reload itself. The processing of the form is based whether the "submit" button has been pressed. If the submit button has NOT been pressed, then the form loads and the user can enter data. If the submit button HAS been pressed, then you would do your form processing.

This example is not covered in this tutorial due to its confusing concepts. Debugging and maintaining the code is more difficult.

Next Lesson - Creating PHP Forms in NOF

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