2 different databases: 1 page, 1 submit button?<

admin

Administrator
Staff member
Need to find a way to submit the same form field information to 2 different databases.

The form field information is the usual name, phone, address stuff that needs to be sent to 2 different databases with one click of the submit button.

I need to know how to set up the page with 2 "form action" lines with the same post submit button.

Explaination with code samples would be much appreciated.

ThanksWell to get that information into a database you have got to be using a server-side programming language such as asp or php. You don't need to use two form actions. Just use one that points to another page containing the necessary code to populate both databases.

Please tell us which language you are using and then I'll move this to the appropriate forum so we can answer your question in more detail.

Thanks.It's PHP right now and could be switching to ASP soon.

Any insight would be great.

Thanksit would also depend on if the second database is in your domain. if it is not in your domain then you might not be able to do what you want. what is the point of doing 2 databases?After one of our new customers purchases a monthly membership subscription (our primary product) from our website, our merchant account provider then redirects them to our "thank you" page where they will fill out their information (name, email etc.)to establish a new membership account with us.

As of now, after they submitted this membership information, they would then need to re-enter all of this same information to start up their included autoresponder account.

So now, instead of having to fill out their initial information and then later having to re-enter that same information all over again for the responder, they will then set up both accounts at the same time, right after purchasing.

BTW, The databases are located on 2 different domains of which I have full access to.

Hope this helps.

thanks for your helpdifferent domains is the problem. not sure if the security will let you do that.

but since you can supply an IP to mysql then yes you might. this is what is great about php


<?php
mysql_connect ("IP_of_server","username","password");
$db1 = mysql_select_db ("db1");


mysql_connect ("ip_of_ server","username","password");
db2 = mysql_select_db ("db2");

$sql1 = mysql_query("select * from table" , $db1);
$sql2 = mysql_query("select * from table2" , $db2);
?>

the $db1 and $db2 allow you to connnect to a specific database. so in theory it should work. but the security maybe the factor.
 
Back
Top