我有一个php / mysql应用程序,其中我有一个广泛拥有以下字段的数据库:
我可以使用SELECT语句显示记录,没有任何问题。
现在,我希望能够做到以下几点,这就是我需要你如何实现它的帮助/建议:
从显示的记录列表中随机选择一些记录(使用复选框或此处建议的任何其他方法)。
有一个按钮说"已处理"屏幕上。当我点击按钮时,屏幕应该刷新,上面步骤1中选择的记录应该移动到另一个数据库,现在只显示未经检查的记录。
请告诉我有关如何执行上述操作的建议。
由于 TS
答案 0 :(得分:0)
为此,您可以使用记录的id,使用另一个选择查询获取特定记录的信息,还可以使用记录的id更新记录。 (创建一个编辑链接并传递id,在编辑页面上获取带有id的信息并保存。)
答案 1 :(得分:0)
<?php //your db connection and select query here ?>
<form action="process.php" method="post" enctype="multipart/form-data">
<?php
// loop starts here
echo "<input type='checkbox' name='ids[]' value='".$row["id"]."' />";
// loop ends here
?>
<input type="submit" name="process" value="Processed"/>
</form>
This will create the checkboxes and on the process.php page
you can get the ids your need to process and can move your data
to other table/db where you want and after than redirect back to
to the page where your code is.
&#13;