title: Notice: Undefined index: image in D:\wamp\www\onlinesShop\newitem.php on line 21
body: <p>I tr to upload image in my phpMYadmin with php and msqli But Got the mentioned error so practically everything will insert except the image.I Think every thing is good don't know where is the problem please help:(</p>
  
  <p>here is the php:</p>
  
  <pre><code>&lt;?php
          if(isset($_POST['submit'])){
          $Name=$_POST['Name'];
          $Desc=$_POST['Desc'];
          $Image=$_FILES['image']['tmp_name']; //get error in this line
  
          echo $_FILES['image']['error'];//get error in this line
  
  
          $sql="INSERT INTO `items`(`Name`,`Description`, `image`) 
          VALUES('$Name','$Desc','$Image')";
  
  
          if(mysqli_query($con,$sql)){ 
          echo "new record";
          }
          else{echo"Wrong";}
          mysqli_close($con);
          }
          ?&gt;
  </code></pre>
  
  <p>the html:</p>
  
  <pre><code>&lt;form action="http://localhost/onlinesShop/newitem.php" method="POST" &gt; 
              &lt;table  id='table_admin'&gt;
                  &lt;tbody&gt;
                    &lt;tr&gt;
                      &lt;td width="116" height="50" align="left"&gt;Name&lt;/td&gt;
                      &lt;td width="466"&gt;&lt;input name="Name" type="text" id="Name" title="Name" maxlength="200"&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                      &lt;td height="290"&gt;Description&lt;/td&gt;
                      &lt;td&gt;&lt;textarea name="Desc" cols="40" rows="15" id="textarea"&gt;&lt;/textarea&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                      &lt;td&gt;Image&lt;/td&gt;
                      &lt;td width="80"&gt;&lt;input type="file" name="image" id="fileField" &gt;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                      &lt;td&gt;&amp;nbsp;&lt;/td&gt;
                      &lt;td&gt;&lt;input type="submit" name="submit" id="submit" value="Upload"&gt;&lt;/td&gt;
                    &lt;/tr&gt;
                  &lt;/tbody&gt;
          &lt;/form&gt;
              &lt;/table&gt;
          &lt;/div&gt;
  </code></pre>