我正在尝试创建一个允许管理员接受或拒绝图像的按钮。当管理员接受它将图像从unimages移到images文件夹时,数据库代码正在运行,但是我仍然无法将图像移至另一个文件夹。
$db = mysqli_connect("localhost", "root", "", "drawingguide");
$id=$_GET["id"];
$accept = mysqli_query($db, "SELECT * FROM verify WHERE id=$id");
mysqli_query($db, "INSERT INTO images SELECT NULL,un_image, un_category FROM
verify WHERE un_id=$id");
rename("unimages/$accept[un_image]", "images/$accept[un_image]");
$reject= mysqli_query($db, "SELECT * FROM verify WHERE un_id = $id");
$delete = mysqli_fetch_array($reject);
mysqli_query($db, "DELETE FROM verify WHERE un_id = $id");