![]() |
![]() |
||||||
|
|||||||
| Tags: button, forms, page, submit |
![]() |
|
|||
|
Using Dreamweaver CS3 I've created a page that basically has 2 forms on it.
Each form is connected to its own recordsource / database (but display information regarding the same customer). Right now there's a "submit" button underneath each form. I'd really like to be able to set this up so that there is only one "submit" button and it updates both databases from the form data once it is pushed. Is this possible? If so, could someone please point me to some directions on how to do it? Any help would be greatly appreciated. Thank you. |
| Sponsored Links |
|
|||
|
It is possible, but the easiest way would be to combine the two forms into a
single one. Why not do it that way? -- Murray --- ICQ 71997575 Adobe Community Expert (If you *MUST* email me, don't LAUGH when you do so!) ================== http://www.projectseven.com/go - DW FAQs, Tutorials & Resources http://www.dwfaq.com - DW FAQs, Tutorials & Resources ================== "GlennC02108" <webforumsuser@macromedia.com> wrote in message news:g9ejc0$rge$1@forums.macromedia.com... > Using Dreamweaver CS3 I've created a page that basically has 2 forms on > it. > Each form is connected to its own recordsource / database (but display > information regarding the same customer). > > Right now there's a "submit" button underneath each form. > > I'd really like to be able to set this up so that there is only one > "submit" > button and it updates both databases from the form data once it is pushed. > > Is this possible? If so, could someone please point me to some directions > on > how to do it? > > Any help would be greatly appreciated. > > Thank you. > |
|
|||
|
I have also have a problem posting to two different tables on one submit.
However, I cannot get the second table in the database to update. I tried consolidating two forms into one. In my last attempt I tried naming the $insertSQL statements. Any suggestions would be appreciated. I have reasons why I violated database normalization rules so please don't pick that logic apart. I have attached the code. if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) { $time = time(); $_POST['truck_out'] = date("Y-m-d H:i:s", $time); $insertSQL = sprintf("INSERT INTO truck_usage (truck_key, truck_driver, truck_num, truck_dest, truck_comment, truck_status, truck_out, boat_num_out) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['truck_key'], "int"), GetSQLValueString($_POST['truck_driver'], "text"), GetSQLValueString($_POST['truck_num'], "int"), GetSQLValueString($_POST['truck_dest'], "text"), GetSQLValueString($_POST['truck_comment'], "text"), GetSQLValueString($_POST['truck_status'], "text"), GetSQLValueString($_POST['truck_out'], "date"), GetSQLValueString($_POST['boat_num_out'], "int")); // If statement to see if there is a boat going out // if ($_POST['boat_num_out'] != ""){ $_POST['boat_out'] = date("Y-m-d H:i:s", $time); $_POST['boat_num'] = $_POST['boat_num_out']; $_POST['boat_driver'] = $_POST['truck_driver']; $_POST['boat_dest'] = $_POST['truck_dest']; $_POST['truck_num_out'] = $_POST['truck_num']; $insertSQL1 = sprintf("INSERT INTO boat_usage (boat_key, boat_driver, boat_num, boat_dest, boat_status, boat_out, truck_num_out) VALUES (%s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['boat_key'], "int"), GetSQLValueString($_POST['boat_driver'], "text"), GetSQLValueString($_POST['boat_num'], "int"), GetSQLValueString($_POST['boat_dest'], "text"), GetSQLValueString($_POST['boat_status'], "text"), GetSQLValueString($_POST['boat_out'], "date"), GetSQLValueString($_POST['truck_num_out'], "int")); } |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise