<?php
ini_set("display_errors","on");
$conn = new COM("ADODB.Connection");
   try {
   $myServer = "WTCPHFILESRV\WTCPHINV";
   $myUser = "sa";
   $myPass = "P@ssw0rd";
   $myDB = "wtcphitinventory";   
   $connStr = "...conn string...";
   $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);}
    $sql_exp = "select * from dbo.PC"; 
  $rs = $conn->Execute($sql_exp);
 echo "<table><tr><th>Desktop Number</th></th></tr>";
   while (!$rs->EOF) {
       set_time_limit(0);    
       echo "<td>CP # <br>".$rs->Fields("PC_Number")."</td>";           
      $rs->MoveNext();
   }   
   echo "</table>";   
   $rs->Close();   
       ?>  
データベースから PC_Number のすべてのデータを印刷するだけでなく、リスト ボックスが必要です。私ができることは、それをエコーすることだけで、選択を挿入するのに苦労しています。select(listbox) と一緒にフォームメソッドを投稿したい