In your form you are using
<input type="file" name="upload">
So "upload" is the name you're using.
In processing, you need to use this same name.
<?php
//This is the directory where images will be saved
$target = "/images/COMPANIES/";
$filename = stripslashes($_FILES['upload']['name']);
$target = $target.$filename;
//This gets all the other information from the form
$company_name=$_POST['company_name'];
$basicpackage_description=$_POST['basicpackage_description'];
$location=$_POST['location'];
$postcode=$_POST['postcode'];
$upload=$filename;
// Connects to your Database
mysql_connect("******host", "****username", "****password") or die(mysql_error()) ;
mysql_select_db("****DB") or die(mysql_error()) ;
//Writes the information to the database
$company_name = mysql_real_escape_string($company_name);
$basicpackage_description = mysql_real_escape_string($basicpackage_description);
$location = mysql_real_escape_string($location);
$postcode = mysql_real_escape_string($postcode);
$upload = mysql_real_escape_string($upload);
mysql_query("INSERT INTO `Companies` VALUES ('$company_name', '$basicpackage_description', '$location', '$postcode', '$upload')") ;
//Writes the photo to the server
if(move_uploaded_file($_FILES['upload']['tmp_name'], $target))
{
//Tells you if its all ok
echo "The file ". $_FILES['upload']['name']. " has been uploaded, and your information has been added to the directory";
}
else {
//Gives and error if its not
echo "Sorry, there was a problem uploading your file.";
}
?>