Undefined index : <p>I get Undefined index: image error in this code. Can I know the exact solution? I wanna know workflow from line abc to xyz that I commented in the code using //.Thanks for your help..</p>

<pre><code>   &lt;?php session_start();
  include("config.php");
 if(isset($_SESSION['name']))
 {
if(!$_SESSION['name']=='admin')
{
header("Location:login.php?id=You are not authorised to access this page unless you are administrator of this website");
}
}
?&gt;
 &lt;?php
  $name=$_FILES['image']['name'];
 $tmp=$_FILES['image']['tmp_name'];
  $err=$_FILES['image']['error'];
   }
 if($err==0)
 {
 move_uploaded_file($tmp, $name);
  //xyz}
 $category=$_POST['category'];
 $title=$_POST['title'];
$image=$_FILES["image"]["name"];
$content=$_POST['content'];
}
&lt;?php
 $qry=mysql_query("INSERT INTO articles(title,image,content,category)VALUES('$title','$image','$content','$category')");
if(!$qry)
 {
die("Query Failed: ". mysql_error());
}
else
{
echo "Article Added Successfully";
}
 ?&gt;

  The form code is here:
&lt;?php
include("config.php");
$sql=mysql_query("select * from category");
if(!$sql)
{
mysql_error();  
}
?&gt;
&lt;form action="created_article.php" method="post"&gt;
Category:
&lt;select name="category"&gt;
&lt;?php
while($row=mysql_fetch_array($sql))
{
echo"&lt;option value='".$row['category']."'&gt;".$row['category']."&lt;/option&gt;";
}
?&gt;
&lt;/select&gt;
Title:
&lt;input type="text" name="title"/&gt;
Upload Image:
&lt;input type="file" name="image" id="image" /&gt;
Contents:
&lt;textarea name="content" cols="100" rows="12" &gt;&lt;/textarea&gt;
&lt;input type="submit" name="button"  value="Submit" /&gt;
&lt;/form&gt;
</code></pre>

<p>I need help with these code, I need to make project and I'm stuck here, so please kindly I request for your help,</p>
