|
-
May 2nd, 2003, 05:27 AM
#1
Thread Starter
Member
Upload Problem
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
FmKing
***************************
Sharing Knowledge = Good Deed
***************************
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|