title: Select statement for 3 tables
body: <p>So i have a php program in which i should be able to print the variable</p>
  
  <p>table 1<br>
  dbo.FA_PC(table name)<br>
  FAID(PK)<br>
  PCID (FK)<br>
  UserID(FK)  </p>
  
  <p>table 2<br>
  dbo.users(table name)<br>
  UserID(PK)<br>
  BranchID(FK)<br>
  Employeename  </p>
  
  <p>table 3 
  dbo.Branch(table name)<br>
  BranchID(PK)<br>
  Branchname  </p>
  
  <pre><code>&lt;?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-&gt;open($connStr); 
           if (! $conn) {
              throw new Exception("Could not connect!");
          }
     }
  
     catch (Exception $e) {
        echo "Error (File:): ".$e-&gt;getMessage()."&lt;br&gt;";
     }
  if (!$conn)
    {exit("Connection Failed: " . $conn);}
    echo "&lt;center&gt;";
     echo "&lt;table border='0' width ='100%' style='margin-left:90px'&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;/tr&gt;";
     $sql_exp = "select * from dbo.users inner join dbo.FA_PC on dbo.userd.UserID = dbo.FA_PC.UseriD WHERE FAID = $faidf";    
     $rs = $conn-&gt;Execute($sql_exp);  
  
      echo "&lt;tr&gt;&lt;td&gt;PC Number:".$rs-&gt;Fields("Employeename")."&lt;/td&gt;";
  ?&gt;  
  </code></pre>
  
  <p>what i want to do is when FAID is selected is could post the Branchname of the FAID selected</p>