通过使用PHP和ODBC在数据库中显示数据

通过使用PHP和ODBC在数据库中显示数据,php,html,sql,odbc,Php,Html,Sql,Odbc,我试图将数据从数据库拉到html表单,我已经在while循环中为一个表这样做了,但没有为表单这样做。这是我的密码: if(isset($_POST['search'])){ $quote = $_POST['quote']; } $stmt = "SELECT * FROM dbo.tblVersions2 WHERE QuoteNumber LIKE '".$quote."'"; $result = odbc_exec($conn, $stmt) or die('ODBC Er

我试图将数据从数据库拉到html表单,我已经在while循环中为一个表这样做了,但没有为表单这样做。这是我的密码:

if(isset($_POST['search'])){ 
$quote = $_POST['quote'];

}

  $stmt = "SELECT * FROM dbo.tblVersions2 WHERE QuoteNumber LIKE '".$quote."'"; 
  $result = odbc_exec($conn, $stmt) or die('ODBC Error: ' . odbc_errormsg($conn) );  


   while (odbc_fetch_row($result)) // while there are rows
  {
    // What do i out here? I only know echo "<td>" . odbc_result($result, "QuoteNumber") . "</td>";
    // which is to display tabular data, but how with a form??
  }

?>
if(isset($\u POST['search']){
$quote=$_POST['quote'];
}
$stmt=“从dbo.tblVersions2中选择*,其中QuoteNumber LIKE'。$quote.”;
$result=odbc_exec($conn,$stmt)或die('odbc Error:'。odbc_errormsg($conn));
while(odbc_fetch_row($result))//有行时
{
//我在这里做什么?我只知道echo“.odbc”结果($result,“QuoteNumber”);
//哪一种是显示表格数据,但如何使用表格??
}
?>
我尝试在while循环中声明一个变量,例如$Address1=-'Address1];然后以value=“但是它似乎不起作用,请帮助