画像をアップロードしようとしているこのフォームがありますが、ページを「更新」するたびに通常の状態に戻り、「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");
}
}
?>
助けてください...