Update Image against URL ID

I am not good in PHP but I try following code to insert or update image against URL ID but when I check in database no updation or insertion found. Kindly check the code may be coding error is it.I have two pages. add.html and insert.php

URL script is <a href=“insert.php?property_id=$property_id” class=“txt_content03_bold”>Add Photos</a>   </td>

URL code is http://www.mysite.com/insert.php?property_id=6

add.html is as follow

<form enctype="multipart/form-data" action="insert.php" method="post" name="changer">
<input name="MAX_FILE_SIZE" value="102400" type="hidden">
<input name="image" accept="image/jpeg" type="file">
<input value="Submit" type="submit">


insert.php is follow


$id = $_POST['property_id'];
$username = "okokok";
$password = "okokok";
$host = "localhost";
$database = "okokok";

// Make the connect to MySQL or die
// and display an error.
$link = mysql_connect($host, $username, $password);
if (!$link) {
die('Could not connect: ' . mysql_error());

// Select your database
mysql_select_db ($database);

//$ordercode = $_POST['ordercode']; 

if (isset($_FILES['image']) && $_FILES['image']['size'] > 0) { 

// Temporary file name stored on the server
$tmpName = $_FILES['image']['tmp_name']; 

// Read the file 
$fp = fopen($tmpName, 'r');
$data = fread($fp, filesize($tmpName));
$data = addslashes($data);

// Create the query and insert
// into our database.

$query = "update qatproperty_mst set image ='$data' WHERE property_id ='$id'";

//in URL code property_id is 6 so when I enter property_id=6 (manually) it works fine in above $query updation but when if it is like this property_id ='$id' its not getting property_id from URL and no record //was updated.property_id is primary key in the table and also auto increase.:)

$results = mysql_query($query, $link);

// Print results
print "Thank you, your file has been uploaded.";

else {
print "No image selected/uploaded";

// Close our MySQL Link


Kindly help me and thanks in advance.

Your missing on the HTML form a property_id input and the php script needs to get the value for property_id from the $_POST array

How to add property_id input in HTML kindly edit html form for me…

thank you