title: can't upload images from website to my database using XAMPP
body: <p>I am having some trouble uploading images to my blog, every time I try summiting the form it returns 'Failed to upload image :'. I can’t figure out the problem</p>
  <pre><code>    if (!empty($_FILES['image']['name'])) {
          $image_name = time() . '_' . $_FILES['image']['name'];
          $destination = ROOT_PATH . &quot;/assets/images/&quot; . $image_name;
  
         $result = move_uploaded_file($_FILES['image']['tmp_name'], $destination);
  
        if ($result) {
              $_POST['image'] = $image_name;
              
          }else {
              array_push($errors, 'Failed to upload image :');
              
          }
          
          
      }else {
          array_push($errors, 'Image is required!');
      }
  </code></pre>