使PHP脚本可编辑并从SQL表中提取数据

时间:2019-01-29 08:09:13

标签: php html

我已经用HTML创建表并使用在线工具将其转换为PHP。以下是表格的编码和图像的一部分。现在我想使文本框可编辑并显示来自sql表的数据。我该怎么办?

Table image

 print "    <td class=\"tg-7btt\">U</td>\n";
 print "    <td class=\"tg-fymr\"><W/td>\n";
 print "    <td class=\"tg-fymr\">X</td>\n";
 print "    <td class=\"tg-fymr\">Y</td>\n";
 print "    <td class=\"tg-fymr\">Z</td>\n";
 print "  </tr>\n";
 print "  <tr>\n";
 print "    <td class=\"tg-fymr\">Planned Execution Metrics</td>\n";
 print "    <td class=\"tg-c3ow\" colspan=\"5\"></td>\n";
 print "  </tr>\n";
 print "  <tr>\n";
 print "    <td class=\"tg-0pky\">Total planned Test Cases</td>\n";
 print "    <td class=\"tg-c3ow\"></td>\n";
 print "    <td class=\"tg-0pky\"></td>\n";
 print "    <td class=\"tg-0pky\"></td>\n";
 print "    <td class=\"tg-0pky\"></td>\n";
 print "    <td class=\"tg-0pky\"></td>\n";
 print "  </tr>\n";

2 个答案:

答案 0 :(得分:0)

ls | grep -E "\.pdf$" | awk -F "." '{if ($1>20100000) print $1}' 内使用input,并在输入的td属性内显示sql数据

答案 1 :(得分:0)

为什么需要文本框,您可以直接从下面的代码中完成

<div class="tables">
<table class="table"> <thead> <tr> <th>Id</th> <th>Message</th> <th>Date</th> <th>Exipry date</th>  <th> Actions </th> <th> &nbsp </th> </tr> </thead> 
<tbody> 
<?php
 $sql="select * from notice";
 $result=mysql_query($sql);
while($row=mysql_fetch_array($result))
{
echo "<tr class='active'> 
        <td>".$row[0]."</td> 
        <td>".$row[1]."</td> 
        <td>".$row[2]."</td> 
        <td>".$row[3]."</td>
        </tr>";
    }
?>