Hello,
Can I transfer form data which i capture using a PHP file running on Apache/Linux server to an application on window NT which would process the data and send back the results to Linux ?
Can anyone help me on this.
Thanks in advance.
Data transfer across servers
Moderator: General Moderators
It's really the same as to the current server you only need permission.
//Since it's NT here is a MSSQL Connect String
$host = "DistantServer"; //you may need port Num also
$username = "PermittedUser";
$password = "PermittedPass";
$dbname = "Database";
MSSQL_CONNECT($host,$username,$password) or DIE("DATABASE FAILED TO RESPOND.");
mssql_select_db($dbname) or DIE("Table unavailable");
//Since it's NT here is a MSSQL Connect String
$host = "DistantServer"; //you may need port Num also
$username = "PermittedUser";
$password = "PermittedPass";
$dbname = "Database";
MSSQL_CONNECT($host,$username,$password) or DIE("DATABASE FAILED TO RESPOND.");
mssql_select_db($dbname) or DIE("Table unavailable");
riley wrote:It's really the same as to the current server you only need permission.
Thanks for your reply.
but i would like to have more info on that.
For Example
I visit to a page : http://mydomain.com/info.php which comes from Linux
I have to fill in some form fields and when i submit that page,I have to transfer or post the data to an application which is on WinNT.
Is it possible ? if so how can i do it??
Thanks
//Since it's NT here is a MSSQL Connect String
$host = "DistantServer"; //you may need port Num also
$username = "PermittedUser";
$password = "PermittedPass";
$dbname = "Database";
MSSQL_CONNECT($host,$username,$password) or DIE("DATABASE FAILED TO RESPOND.");
mssql_select_db($dbname) or DIE("Table
unavailable");
This is form on the Linux Box.
This is NT Box running IIS that has the ability to conncect with Mssql maybe even on yet another box. This is
Hope this helps a little. If not give a more detailed explanation of what application you are trying to update.
Code: Select all
<Form Action='http://www.ntbox.com/editdata.php' Method='POST' Name='frmEditData'>
<Input Type='Text' Name='Data1'>
<Input Type='Submit' Value='Edit'>
</Form>Code: Select all
<?
mssql_connect("NTBoxRunningSql", "Username", "Password");
mssql_select_db("database") or DIE("Table unavailable");
$query = "Insert $Data1 Into Table";
$result = MSSQL_QUERY($query);
Echo MSSQL_NUM_ROWS($result);
?>