beautypg.com

Build the insert page in one operation – Adobe Dreamweaver CC 2014 v.13 User Manual

Page 577

background image

To the top

Repeat the procedure for each form object in your form.

7. In the After Inserting, Go To box, enter the page to open after the record is inserted in the table or click the Browse button to browse to the

file.

8. Click OK.

Dreamweaver adds a server behavior to the page that lets users insert records in a database table by filling out the HTML form and clicking
the Submit button.

Add a server behavior to insert records in a database table (ASP)

1. In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and select Insert Record from the pop-up menu.

2. In the Connection pop-up menu, select a connection to the database.

Click the Define button if you need to define a connection.

3. In the Insert Into Table pop-up menu, select the database table into which the record should be inserted.

4. In the After Inserting, Go To box, enter the page to open after the record is inserted into the table or click Browse to browse to the file.

5. In the Get Values From pop-up menu, select the HTML form used to enter the data.

Dreamweaver automatically selects the first form on your page.

6. Specify a database column to insert the record in, select the form object that will insert the record from the Value pop-up menu, and then

select a data type for the form object from the Submit As pop-up menu.

The data type is the kind of data the column in your database table is expecting (text, numeric, Boolean option values).

Repeat the procedure for each form object in your form.

7. Click OK.

Dreamweaver adds a server behavior to the page that lets users insert records in a database table by filling out the HTML form and clicking
the Submit button.

To edit the server behavior, open the Server Behaviors panel (Window > Server Behaviors) and double-click the Insert Record behavior.

Add a server behavior to insert records in a database table (PHP)

1. In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and select Insert Record from the pop-up menu.

2. Select a form from the Submit Values From pop-up menu.

3. In the Connection pop-up menu, select a connection to the database.

4. In the Insert Table pop-up menu, select the database table to insert the record in.

5. Specify a database column to insert the record in, select the form object that will insert the record from the Value pop-up menu, and then

select a data type for the form object from the Submit As pop-up menu.

The data type is the kind of data the column in your database table is expecting (text, numeric, Boolean option values).

Repeat the procedure for each form object in your form.

6. In the After Inserting, Go To box, enter the page to open after the record is inserted in the table or click the Browse button to browse to the

file.

7. Click OK.

Dreamweaver adds a server behavior to the page that lets users insert records in a database table by filling out the HTML form and clicking
the Submit button.

Build the insert page in one operation

1. Open the page in Design view, and select Insert > Data Objects > Insert Record > Record Insertion Form Wizard.

2. In the Connection pop-up menu, select a connection to the database. Click Define if you need to define a connection.

3. In the Insert Into Table pop-up menu, select the database table into which the record should be inserted.

4. If you use ColdFusion, enter a user name and password.

5. In the After Inserting, Go To box, enter the page to open after the record is inserted into the table or click the Browse button to browse to the

file.

6. In the Form Fields area, specify the form objects you want to include on the insert page’s HTML form, and which columns in your database

table each form object should update.

By default, Dreamweaver creates a form object for each column in the database table. If your database automatically generates unique key
IDs for each new record created, remove the form object corresponding to the key column by selecting it in the list and clicking the Minus (-)
button. This eliminates the risk that the user of the form will enter an ID value that already exists.

You can also change the order of the form objects on the HTML form by selecting a form object in the list and clicking the up or down arrow

570

This manual is related to the following products: