Hay everybody, I have this Form I am trying to upload my image but every time I do "update" the page return normal and nothing uploded to my folder "ProfilesImages" where is my fault.

  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");
        }
      }
    ?>

any help plz...

Can you post your HTML form code?

After submitting your form, are you getting any errors? Which form message are you seeing - the one on line 31 or 33?

R.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.