if($theCARPIC!="")
{
$uploaddir = '.';
if (move_uploaded_file($_FILES["theCARPIC"]["tmp_name"], $uploaddir . $_FILES["theCARPIC"]["name"]))
{
echo "good" ;
}
else
{
echo "bad" ;
}
// gets car.jpg from c:\temp\temp2\a_folder\car.jpg
echo "1. $theCARPIC <BR>";
$theCARPIC=$_FILES["theCARPIC"]["name"];
$temparray = explode("\\", $theCARPIC);
$thispos = ((sizeof($temparray)) -1);
$theCARPIC = $temparray[$thispos];
echo "2. $theCARPIC <BR>";
$dbQuery="UPDATE cars SET picFile='$theCARPIC'" .
" WHERE carID='$theCARID' ";
$result = mysql_query($dbQuery,$db);
}
can anyone see why this fails to upload? Permissions are open yet "bad" is still being echoed!
$carpic at point 2. is blank so the problem is def within the upload statement! help!!!