Current location: Hot Scripts Forums » Programming Languages » PHP » Send form results to multiple databases

Send form results to multiple databases

Reply
  #1 (permalink)  
Old 08-18-04, 11:54 AM
stomlin stomlin is offline
Newbie Coder
 
Join Date: Jul 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Send form results to multiple databases

I have a form that I am sending to a database. However, the form is incredibly long so I would like the results split and have the first part of the form sent to one database and the second part to another table in the same database. Is this possible?

If not how do you split a form so that the user can come back and continue entering data at a later time??
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 08-18-04, 12:05 PM
Bonzo's Avatar
Bonzo Bonzo is offline
Coding Addict
 
Join Date: Jan 2004
Posts: 340
Thanks: 0
Thanked 0 Times in 0 Posts
Try putting two database "INSERT INTO" lines with half the form details in one and the other half in the other ?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 08-18-04, 12:05 PM
Bonzo's Avatar
Bonzo Bonzo is offline
Coding Addict
 
Join Date: Jan 2004
Posts: 340
Thanks: 0
Thanked 0 Times in 0 Posts
Something strange happened - submitted twice my fault : )

Anthony
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 08-18-04, 12:14 PM
stomlin stomlin is offline
Newbie Coder
 
Join Date: Jul 2004
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
This is what I have for the insert section


mysql_select_db("database_name");
$query = "insert into table01_name (LastName, FirstName, MI, Address, AptNumber, CurrentCity, CurrentState, CurrentZip, CurrentHomePhone, CurrentAltPhoneNumber, CurrentEmail, SocialSecurityNumber, DriversLicense, IssuingState) values ('".$LastName."','".$FirstName."','".$MI."','".$Ad dress."','".$AptNumber."','".$CurrentCity."','".$C urrentState."','".$CurrentZip."','".$CurrentHomePh one."','".$CurrentAltPhoneNumber."','".$CurrentEma il."','".$SocialSecurityNumber."','".$DriversLicen se."','".$IssuingState."')";

mysql_select_db("database_name");
$query = "insert into table02_name (ResidenceHistoryAddress1, ResidenceHistoryCity1, ResidenceHistoryState1, ResidenceHistoryZip1, ResidenceHistoryFrom1, ResidenceHistoryTo1, ResidenceHistoryAddrss2, ResidenceHistoryCity2, ResidenceHistoryState2, ResidenceHistoryZip2, ResidenceHistoryFrom2, ResidenceHistoryTo2, ResidenceHistoryAddrss3, ResidenceHistoryCity3, ResidenceHistoryState3, ResidenceHistoryZip3, ResidenceHistoryFrom3, ResidenceHistoryTo3, ResidenceHistoryAddrss4, ResidenceHistoryCity4, ResidenceHistoryState4, ResidenceHistoryZip4, ResidenceHistoryFrom4, ResidenceHistoryTo4, ResidenceHistoryAddrss5, ResidenceHistoryCity5, ResidenceHistoryState5, ResidenceHistoryZip5, ResidenceHistoryFrom5, ResidenceHistoryTo5, ResidenceHistoryAddrss6, ResidenceHistoryCity6, ResidenceHistoryState6, ResidenceHistoryZip6, ResidenceHistoryFrom6, ResidenceHistoryTo6) values ('".$ResidenceHistoryAddress1."','".$ResidenceHist oryCity1."','".$ResidenceHistoryState1."','".$Resi denceHistoryZip1."','".$ResidenceHistoryFrom1."',' ".$ResidenceHistoryTo1."','".$ResidenceHistoryAddr ss2."','".$ResidenceHistoryCity2."','".$ResidenceH istoryState2."','".$ResidenceHistoryZip2."','".$Re sidenceHistoryFrom2."','".$ResidenceHistoryTo2."', '".$ResidenceHistoryAddrss3."','".$ResidenceHistor yCity3."','".$ResidenceHistoryState3."','".$Reside nceHistoryZip3."','".$ResidenceHistoryFrom3."','". $ResidenceHistoryTo3."','".$ResidenceHistoryAddrss 4."','".$ResidenceHistoryCity4."','".$ResidenceHis toryState4."','".$ResidenceHistoryZip4."','".$Resi denceHistoryFrom4."','".$ResidenceHistoryTo4."','" .$ResidenceHistoryAddrss5."','".$ResidenceHistoryC ity5."','".$ResidenceHistoryState5."','".$Residenc eHistoryZip5."','".$ResidenceHistoryFrom5."','".$R esidenceHistoryTo5."','".$ResidenceHistoryAddrss6. "','".$ResidenceHistoryCity6."','".$ResidenceHisto ryState6."','".$ResidenceHistoryZip6."','".$Reside nceHistoryFrom6."','".$ResidenceHistoryTo6."')";
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
formmail problem gscraper Perl 12 08-27-04 03:06 AM
transfer multiple value of a form field to another field ore JavaScript 2 06-18-04 08:50 PM
Passing results of a form select to another form?? NCC1701 PHP 1 04-29-04 11:54 AM
E-Mail form / Send code on one page perleo PHP 4 02-11-04 01:16 AM
send email when sending form (asp) bmatth1 Script Requests 0 09-30-03 05:52 AM


All times are GMT -5. The time now is 04:11 PM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.