当我尝试将内容提交到表单时,我收到以下错误消息。我该如何解决?
注意:未定义的索引:第4行D:\ xampp \ htdoc \ update.php中的pname 注意:未定义索引:第5行D:\ xampp \ htdoc \ update.php中的pname
<body>
<?php
if(isset($_POST['submit'])) {
$name_photo = $_FILES['pname']['name'];
$temp = $_FILES['pname']['temp_name'];
$sql = "INSERT INTO pembicara(foto_pembicara) VALUES(:foto)";
$query = $dbConn->prepare($sql);
$query->bindparam(':foto', $name_photo);
$query->execute();
}?>
<form method="post">
<input type="file" name="pname"><br><br>
<input type="submit" value="submit" name="submit">
</form>
</body>