title: File upload not working on wamp server?
body: <p>I am working on a project where you have to upload all files on a server in JPEG format but this following code in upload.php is not working, like it is not checking the condition whether there is a name to album or not.</p>
  
  <p>Following file is upload.php with database connect to it with 4 fields in table... <code>id</code>, <code>name</code>, <code>album_id</code>, <code>url</code>.   </p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;PHP file upload&lt;/title&gt;
  &lt;link rel="stylesheet" href="style.css" /&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;?php include 'connect.php'; ?&gt;
  &lt;div id="body"&gt;
    &lt;?php include 'title_bar.php'; ?&gt;
      &lt;div id="container"&gt;
      &lt;h3&gt;Upload&lt;/h3&gt;
      &lt;form enctype="multipart/form-data" method="POST"&gt;
  
          &lt;?php
  
          if (isset($_POST['upload'])) {
              $name = $_POST['name'];
              $album_id = $_POST['album'];
              $file = $_FILES['file']['name'];
              $file_type = $_FILES['file']['type'];
              $file_size = $_FILES['file']['size'];
              $file_tmp = $_FILES['file']['tmp_name'];
  
              if(empty($name) || empty($file)){
                  echo "Please Fill ALL THE FUIELD ";
              }else{
                  echo "working";
              }
          }
  
  
  
          ?&gt;
          Name : &lt;br /&gt;
          &lt;input type="text" name="name" /&gt;
          &lt;br  /&gt; &lt;br  /&gt;
          Select Folder : &lt;br /&gt;
          &lt;select&gt;
              &lt;?php 
                  $query = mysql_query("SELECT id , name FROM albums");
                  while($run = mysql_fetch_array($query)){
                      $album_id = $run['id'];
                      $album_name = $run['name'];
                      echo "&lt;option value='$album_id'&gt; $album_name &lt;/option&gt;";
                  }
              ?&gt;
          &lt;/select&gt;
          &lt;br /&gt;&lt;br /&gt;
          Select File : &lt;br /&gt;
          &lt;input type="file" name="file" /&gt;
          &lt;br /&gt; &lt;br /&gt;
          &lt;input type="submit" name="Upload" value="Upload" /&gt;
      &lt;/form&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>