Php 带有准备语句的输入类型文件

Php 带有准备语句的输入类型文件,php,html,mysql,prepared-statement,Php,Html,Mysql,Prepared Statement,形式 现在,每当我想编辑一个标题为的行时会发生什么 Include('connect.php'); $query=$handler->prepare("UPDATE ".$college." SET title=?,image=?,imagename=? WHERE id=?"); $query->execute(array($title,$image,$imagename,$storyid)); if($query->rowCount()) {

形式

现在,每当我想编辑一个标题为的行时会发生什么

Include('connect.php');
    $query=$handler->prepare("UPDATE ".$college." SET title=?,image=?,imagename=? WHERE id=?");
    $query->execute(array($title,$image,$imagename,$storyid));
    if($query->rowCount())
    {
        echo "content uploaded!";

    }
    else
    {
        echo "content not uploaded!";
    }
value=“”
然后,如果我选择的图像也更改了标题,那么只有数据上传,否则,如果我不选择图像,只更改标题,那么它不会上传数据


那么,如何使输入的“type file”(mysql列为longblob)看起来好像没有选择任何文件,那么数据也应该在不更改先前插入的图像的情况下更新,或者为输入的“type file”指定一个值,作为先前上传的图像的标题

如果您希望用户能够编辑图像的
标题
,则他们需要一个单独的表单,其中有一个
标题
编辑字段,并显示图像,以便他们可以看到显示的标题正确。条目的
id
将是一个隐藏字段。如果您希望用户能够编辑图像的
title
,则他们需要一个单独的表单,其中有一个
title
编辑字段,并显示图像,以便他们能够看到显示的是正确的标题。条目的
id
将是一个隐藏字段。
Include('connect.php');
    $query=$handler->prepare("UPDATE ".$college." SET title=?,image=?,imagename=? WHERE id=?");
    $query->execute(array($title,$image,$imagename,$storyid));
    if($query->rowCount())
    {
        echo "content uploaded!";

    }
    else
    {
        echo "content not uploaded!";
    }
value="<?php echo $row['title']; ?>"