title: Image not being Uploaded in MySQL
body: <p>This all started with me getting an unidentified index error: image. Then I put in the check before so I would not have to see the error again. However I know the images are not being uploaded. I have used legit images to test, and nothing is working. I have been struggling on this for hours. Please Help. </p>
  
  <pre><code>&lt;html&gt;
      &lt;body&gt;
        &lt;form action="images-add.php" method="post" enctyp="multipart/form-data"&gt;
          &lt;input type="file" name="image" /&gt;
  
          &lt;input type="submit" name="sum" value="upload" /&gt;
        &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  &lt;?php 
  include('connection.php');
  
  if(isset($_POST['image'])) {
  
  if(empty($_FILES) || !isset($_FILES['image'])){
  echo "Please Add an Image";
  }else{
  if(getimagesize($_FILES['image']['tmp_name']) == FALSE){
              $image= addslashes($_FILES(['image']['tmp_name']));    
              $name= addslashes($_FILES(['image']['name']));
              $image= file_get_contents($image); 
              $image= base64_encode($image);
              saveimage($name, $image); 
     }
    }
   } 
  
  function saveimage($name, $image){
        $con= mysql_connect("localhost", "root", ""); 
         mysql_select_db("hw2", $con);
          $qry= "insert into images (name, image) values ('$name', '$image')"; 
          $result= mysql_query($qry,$con); 
      if($result) {
       echo "&lt;br/&gt; Image Uploaded.";   
      }else{
          echo "Not Uploaded";     
      }
    }
  ?&gt;
  </code></pre>