【发布时间】:2017-06-07 03:42:22
【问题描述】:
我使用 html+php 创建了一个动态表,输入类似于表单(这实际上是一个矩阵)和 我想知道是否可以恢复用户在动态表中输入的数据?这是我的代码:
<?php
$rows = 3; // define number of rows
echo ' <form action="f.php" method="post">';
echo "<table border='1'>";
for($tr=1;$tr<=$rows;$tr++){
echo "<tr>";
echo "<th> E".$tr." </th>";
for($td=1;$td<=$rows;$td++){
echo '<td><input type="number" name="etat" placeholder="nb d etat" /></td>';
}
echo "</tr>";
}
echo "</table>";
echo '<input type="submit" value="Create Table">';
echo '</form>'
?>
【问题讨论】:
标签: php html html-table