Skip to main content
Participating Frequently
December 20, 2007
Question

Use record from one table to create new record in a different table?

  • December 20, 2007
  • 1 reply
  • 273 views
Hello,

I'm developing an application with a MySQL back-end. The important tables are "requests" and "projects". I have a master/detail page created that works well with request data. It allows the user to review requests that are submitted. What I'd now like to do is give the user the option of clicking a button on the detail page that would create a new "project" record using all of the request data.

Any suggestions on how this can be done?

Thanks for your help.

This topic has been closed for replies.

1 reply

Inspiring
December 20, 2007
WPW07 wrote:
> What I'd now like to do is give the user the option of clicking a button on the
> detail page that would create a new "project" record using all of the request
> data.

Do it in exactly the same way as you would create an update page. In the
detail page, draw everything into a form, and use an Insert Record
server behavior instead of an Update Record one.

If you don't want anyone to be able to change the details, you can make
the form fields read-only. Alternatively, display the details in HTML,
but also put them in hidden form fields for the Insert Record SB to pick up.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
WPW07Author
Participating Frequently
December 20, 2007
Thank you David. That worked perfectly!