Adobe Dreamweaver Forums



Last 10 THreads :         Renaming topics, links don't work (Last Post : SamDavidson - Replies : 2 - Views : 3 )           »          Flash 10 Player Doesn't Work with IE7 (Last Post : jb one - Replies : 2 - Views : 3 )           »          Re: "Unknown host. Contribute could not fnd theserver..." (Last Post : Elmer Ott - Replies : 0 - Views : 1 )           »          Unable to transfer data (Last Post : Elmer Ott - Replies : 1 - Views : 2 )           »          Question about filtering commas (Last Post : Ian Skinner - Replies : 3 - Views : 4 )           »          cfwindow bug when more than one on page (Last Post : lchalnick - Replies : 1 - Views : 2 )           »          Global variables (Last Post : *gsb* - Replies : 1 - Views : 2 )           »          Noobie Flash Question (Last Post : BigScaryRobot - Replies : 0 - Views : 1 )           »          ANN: Contact Form Solution Pack (Last Post : Michael White - Replies : 10 - Views : 11 )           »          Problems producing W3C-valid template-built pages (Last Post : Murray *ACE* - Replies : 1 - Views : 2 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Dreamweaver: Main > Dreamweaver Application Development
 
Tags: , , ,



Reply
  #1 (permalink)  
Old 08-31-2008, 06:21 PM
GlennC02108
 
Posts: n/a
Diggs:
Default 2 forms on page -- one submit button?

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.



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-31-2008, 10:01 PM
Murray *ACE*
 
Posts: n/a
Diggs:
Default Re: 2 forms on page -- one submit button?

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.
>


Reply With Quote
  #3 (permalink)  
Old 09-01-2008, 08:53 PM
GlennC02108
 
Posts: n/a
Diggs:
Default Re: 2 forms on page -- one submit button?

I am new to Dreamweaver and I used the Update Form Wizard to create the page. I would like one form that updates information in two different tables but wasn't sure how to do it.
Reply With Quote


  #4 (permalink)  
Old 09-08-2008, 10:02 PM
boatman1967
 
Posts: n/a
Diggs:
Default Re: 2 forms on page -- one submit button?

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"));
}

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 09:47 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk