将图像上传/替换为自动增量ID

So i have a small issue. I know how to upload an image normally to a database and place the selected image into a folder. Im making a website that has 10 placeholders, for two of them ive added dummy data into the website, image below:

http://i68.tinypic.com/nb6a87.jpg

The code for pulling these programmes for the database is:

<?php
$results = $mysqli->query("SELECT * FROM programmes ORDER BY ProgrammeName ASC");
if ($results) { 
     $i=0;
 echo '<table><tr>';

 echo '<br/>';
 echo '<br/>';

 while($obj = $results->fetch_object())
{   
    echo '<td>';
    echo '<div class="tvProgs">'; 
    echo '<form method="post" id = "programmes" action="">';
    echo '<div class="progImage"><img src="images/'.$obj->Image.'"></div>';
    echo '<div class="progTitle"><h3>'.$obj->ProgrammeName.'</h3>';
    echo '<div class="progRating"><h4>'.$obj->Rating.'</h4>';
    echo '<br/>';
    echo '</form>';
    echo '</div>';
    echo '</td>';
    $i++; 
    if ($i == 5) {
      echo '</tr><tr>';
    }
}
 echo '</tr></table>';
}
?>

As you can see the default placeholders are set to say "no content" as well as not having an image or a rating.

I have a database that holds one table, image below: http://i67.tinypic.com/14npzxe.jpg

The ID for each programme is auto incremented and the default values for the programme title and the image is "no content".

Ive made a simple upload form that will allow the user to enter the programme title and select and image and try to upload them to the database.

   <form action="upload.php" method="POST" enctype="multipart/form-data">
   Programme Title: <input type="text" name="progTitle">    </br> 
    Select image to upload:<input type="file" name="image" id="image">      <br/>
    <input type="submit" value="Upload" name="submit">
</form>

<?php
            if(isset($_POST['submit']))
            {
                if(getimagesize($_FILES['image']['tmp_name']) == FALSE)
                {
                     echo "Please select an image.";
                }
                else
                {
                    $image= addslashes($_FILES['image']['tmp_name']);
                    $name= addslashes($_FILES['image']['name']);
                    $image= file_get_contents($image);
                    saveimage($name,$image);
                }
            }
            function saveimage($name,$image)
            {
                $con=mysqli_connect("localhost","root","");
                mysqli_select_db($con,"skyprogrammes");
                $qry="Insert INTO programmes (ProgrammeName,Image) values ('$name','$image')";
                $result=mysqli_query($con,$qry);
                if($result)
                {
                    //echo "<br/>Image uploaded.";
                }
                else
                {
                    //echo "<br/>Image not uploaded.";
                }
            }

        ?>

</div>

How do i programme it so that it only uploads the first image/name that has no content?

Any information will be appreciated.