我有这个表格,我正在尝试上传我的图片,但每次我“更新”页面返回正常并且没有任何内容上传到我的文件夹“ProfilesImages”,这是我的错。
<?php
if(isset($_POST['update'])){
$ProfileImage = $_FILES['ProfileImage']['name'];
$Fname = clean_text($_POST['Fname']);
$Lname = clean_text($_POST['Lname']);
$Uemail = $_POST['Remail'];
$Uwebsite = $_POST['website'];
$Ugender = clean_text($_POST['select']);
$Ubirth = (int)$_POST['birth'];
$UWork = clean_text($_POST['company']);
$Uabout = clean_text($_POST['aboutMe']);
$Uhobby = clean_text($_POST['hobby']);
$Uprivatie = $_POST['radio'];
$target = "includes/ProfilesImages/";
$target = $target . basename ($_FILES['ProfileImage']['name']);
$updateUserData = "UPDATE loginaccess SET
profile_image='".$ProfileImage."',
FUname = '".$Fname."',
LUname = '".$Lname."',
Email = '".$Uemail."',
Website = '".$Uwebsite."',
gender = '".$Ugender."',
birth = '".$Ubirth."',
work = '".$UWork."',
about = '".$Uabout."',
hobby = '".$Uhobby."',
privatie = '".$Uprivatie."' where Email='".$_SESSION['email']."' AND active=1";
if(move_uploaded_file($_FILES['ProfileImage']['tmp_name'], $target))
{
echo "<p>The image you have attached was uploaded successfully</p>";
}
else
{
echo " <p><strong>Notes</strong> : no image was attached to the registration form..! </p>";
}
$updateUserDataResults= $db->query($updateUserData) or die("$db->error");
if($updateUserDataResults){
header("Location:index.php?cat=user&learn_id=1");
}
}
?>
任何帮助请...