So i have a php program in which i should be able to print the variable
table 1
dbo.FA_PC(table name)
FAID(PK)
PCID (FK)
UserID(FK)
table 2
dbo.users(table name)
UserID(PK)
BranchID(FK)
Employeename
table 3
dbo.Branch(table name)
BranchID(PK)
Branchname
<?php
$faid=$_POST['faid'];
ini_set("display_errors","on");
$conn = new COM("ADODB.Connection");
try {
$myServer = "WTCPHFILESRV\WTCPHINV";
$myUser = "sa";
$myPass = "P@ssw0rd";
$myDB = "wtcphitinventory";
$connStr = "PROVIDER=SQLOLEDB;SERVER=".$myServer.";UID=".$myUser.";PWD=".$myPass.";DATABASE=".$myDB;
$conn->open($connStr);
if (! $conn) {
throw new Exception("Could not connect!");
}
}
catch (Exception $e) {
echo "Error (File:): ".$e->getMessage()."<br>";
}
if (!$conn)
{exit("Connection Failed: " . $conn);}
echo "<center>";
echo "<table border='0' width ='100%' style='margin-left:90px'><tr><th></th><th></th></tr>";
$sql_exp = "select * from dbo.users inner join dbo.FA_PC on dbo.userd.UserID = dbo.FA_PC.UseriD WHERE FAID = $faidf";
$rs = $conn->Execute($sql_exp);
echo "<tr><td>PC Number:".$rs->Fields("Employeename")."</td>";
?>
what i want to do is when FAID is selected is could post the Branchname of the FAID selected