Php 插入值是动态的

Php 插入值是动态的,php,Php,没有添加任何内容。请尝试使用此代码 Notice: Undefined variable: columns Notice: Undefined variable: columns Warning: implode(): Invalid arguments passed 请在您这边做一些重要的更改,如字段_namefetch等。您的问题不是关注我们您想要什么。你想在所有字段获取后添加新按钮。不,我有一个添加按钮,我想当我单击添加按钮时,我在输入字段中写入的变量被插入并保存在数据库@Ku

没有添加任何内容。

请尝试使用此代码

Notice: Undefined variable: columns 
Notice: Undefined variable: columns 
Warning: implode(): Invalid arguments passed 


请在您这边做一些重要的更改,如字段_namefetch等。

您的问题不是关注我们您想要什么。你想在所有字段获取后添加新按钮。不,我有一个添加按钮,我想当我单击添加按钮时,我在输入字段中写入的变量被插入并保存在数据库@KumarRakeshI中。现在,我有另一个表单,在这里看到它:我不能在这里发布它,我会在我的问题中发布它,当你点击添加按钮,然后用相同的url发布页面刷新,在这里获取查询之前,你必须先插入文件@jasy的数据,如我的答案所示,请检查起始isset($\u post['add'])代码。。在这里你必须插入你的数据。我看到对不起,我提到我已经有一个表格,所以我可以用另一种方式吗?
Notice: Undefined variable: columns 
Notice: Undefined variable: columns 
Warning: implode(): Invalid arguments passed 
<?php
if(isset($_POST['add'])){
      // insert query after upload data
}
?>


<table>
<thead>
   <?php 
    $query = mysqli_query($conn,"SHOW columns FROM `call`");
    // Loop over all result rows
    while($row = mysqli_fetch_array($query))
    {
        echo '<th>';
        echo $row["Field"];
        echo '</th>';
    }
 ?>
 </thead>
 <tbody>
 <?php 
    $query4="SELECT * from `call` WHERE `Generated By` = '$username'";

    $result4=  mysqli_query($conn, $query4);
    while($row4 = mysqli_fetch_assoc($result4)){
        echo '    <form action="" method="post"><tr>';
        foreach($row4 as $values3){
        echo '<td>';
        echo '<input type="text" name="field_name">';
        echo '</td>';
        }
        ?>
        <td>
        <input type="submit" name="add" value="Add">
        </td>
        <?php
        echo '</tr></form>';
 ?>
 </tbody>
</table>