I find my self once again struggling with yet another image upload
script.Everything in this script seems to perform well, except for the
main task it suppose to perform...Uploading the image name into the
database and uploading the picture into the desire save path. Can some
one please help me out with this ?

PHP Code:
if ($submit): 
include (

// upload image to server and add filename to database
if (!is_uploaded_file($image)){ // no image
$image_filename "NULL"//file type unknown
echo "Sorry, but this file type is not recognised as an image, please check and try <a href=""\"java script: history.go(-1)\">again</a>.<br>";
        exit ();
        } else { 
// validates image type, rename and save image
if ($HTTP_POST_FILES['image']['type'] == "image/gif" || $HTTP_POST_FILES['image']['type'] == "image/jpeg" || $HTTP_POST_FILES['image']['type'] == "image/jpg" || $HTTP_POST_FILES['image']['type'] == "image/pjpeg"){
$time_tmp time();
$image_filename $time_tmp._.$HTTP_POST_FILES['image']['name'];
$image_savepath $HTTP_SERVER_VARS['DOCUMENT_ROOT']."\OneXsquare\lk_image";

$sql=("INSERT INTO linkage (id,name,email,url,todaycount,totalcount,timestamp,created, picname)"."VALUES ('NULL', '$name', '$email', '$url', '0', '0', now(), now(), '$image')");
 if (@
mysql_query($sql)) {
"<p>New Link added</p>");
  } else {
"<p>Error adding link: " .
mysql_error() . "</p>");
<p><a href="<?=$PHP_SELF?>" class="link">Add another Link | </a><a href="author.php" class="link">Return 
  to the list of links</a></p>
else: //Allow the user to enter a new author
<form action="<?=$php_self?>" method="post" enctype="multipart/form-data">
  <p><span class="text5">Enter new Link:</span><br />
    <span class="text4">Name:</span> 
    <input type="text" name="name" size="20" maxlength="255" /><br />
    <span class="text4">Email:</span> 
    <input type="text" name="email" size="20" maxlength="255" /><br />
    <span class="text4">_Url_ :</span> 
    <input type="text" name="url" size="20" maxlength="400" /><br />
 <input type="hidden" name="MAX_FILE_SIZE" value="100000">
    <span class="text4"> Send this file: </span> 
    <input name="image" type="file">
<input type="submit" name="submit" value="SUBMIT" /> </p> 
<?php endif;