[Top] [All Lists]

Re: Creating Update and deleting Records Forms

Subject: Re: Creating Update and deleting Records Forms
From: David Powers
Date: Mon, 23 Mar 2009 08:10:49 +0000
Newsgroups: macromedia.dreamweaver.appdev

burkeslaw wrote:
Is it that I have to create the update form manually and then select it and add the update form behaviour? Is there an Go to Detailed Page server behaviour for php, or is this just for ASP technology.
I'm not familiar with the ASP server behaviors, but there is a Master
Detail Page Set for PHP (it's on the Insert > Data Objects menu).
Creating an update page is very easy.

1. Create a page that lists all records in the database.
2. Alongside each record, create a link to the update page.
3. When creating the link, click the Parameters button inside the Select File dialog box. 4. In the Name field of the Parameters dialog box, type the name of the primary key (ID). 5. Click the lightning bolt icon to the right of the Value field, and select the primary key from the recordset.
6. Click OK twice to close both dialog boxes.
7. Save the page and test it in a browser. When you mouse over each link, it should display a URL that looks something like this: update.php?id=3. The name/value pair after the question mark pass the details of the record as a URL parameter to the update page. 8. In the update page, create a recordset that uses the URL parameter as a filter to select a single record depending on the value sent from the previous page. 9. In the update page, create a hidden field to store the ID from the recordset (click the lightning bolt icon alongside the Value field to insert the dynamic data). 10. Apply an Update Record server behavior. Make sure the primary key gets its value from the hidden field in the form.
Alternatively, if you don't want to build your own update form, replace
steps 9 and 10 by using the Record Update Form Wizard (Insert > Data
Objects > Update Record > Record Update Form Wizard).
David Powers
Adobe Community Expert, Dreamweaver

<Prev in Thread] Current Thread [Next in Thread>