我在我的代码上遇到了这个问题。 idk whre和我的错误。
<?php
require 'db.php';
$id=$_REQUEST['id'];
$query = "SELECT * from upload where id='".$id."'";
$result = mysqli_query($connection, $query) or die ( mysql_error());
$row = mysqli_fetch_assoc($result);
?>
<?php
if(isset($_GET['id']) && !empty($_GET['id']))
{
$title = $_POST['title'];// file title
$date = $_POST['date'];// file date
$ref = $_POST['ref'];// file ref
$from_to = $_POST['from_to'];// person incharge
$details = $_POST['details'];// details
$location = $_POST['location'];// file location
$status = $_POST['status'];// file status
$name=$_FILES['photo']['name'];
$size=$_FILES['photo']['size'];
$type=$_FILES['photo']['type'];
$temp=$_FILES['photo']['tmp_name'];
$update="UPDATE upload SET title='".$title."', date='".$date."', ref='".$ref."', from_to='".$from_to."', details='".$details."', location='".$location."', status='".$status."', name='".$name."' where id='".$id."'";
mysqli_query($connection, $update) or die(mysql_error());
$status = "File Updated Successfully. </br></br><a href='view.php'>View Files</a>";
echo '<p style="color:#FF0000;">'.$status.'</p>';
}else {
?>
我是新手。我希望有人能帮助我解决这个问题。