Hi all,

I'm using the following code to upload an image .....it works fine locally...But on the remote server it doesn't upload the image..

-------------------------------------------------------------------------------
//form field name is "images"

$image = "$images_name";

$exten = explode(".", $image);
$exten = strtolower($exten[1]);
$exten = chop($exten);

if (($exten == "gif") || ($exten == "jpg") || ($exten == "jpeg"))
{
$path = "whats_new/$image";
move_uploaded_file($images, "$path");

$sql = "INSERT INTO item (itm_name, description, unit_price, stock, image) VALUES ('$itm_name', '$description', '$unit_price', '$stock', '$image')";
$res = mysql_query($sql);

header("location:add_itm.php?msg=add");
}
else
{
echo "Wrong extension";
}
-----------------------------------------------------------------------------

Kindly check whats wrong..

Thanks