HI guys, i feel like a real loser asking this as i've done this may-a-time in the past (all be it a number of years ago) the rest of the site works fine and the last bit i'm trying to do is to get an image to upload, basicaly i have a simple add/edit/delete page, and it does everything it should - except laod the images, all the code i have done does is hard cropy the root directory i put in as a varible. i'd really really appricate a solotuion (FYI the form field and the DB field is called 'image1' (image 2 and 3 i'll add once i get image1 working)) here's the slice of code i'm working on
if($mode=="add") {
//copy ($_FILES['image1']['tmp_name'], "./images".$_FILES['image1']['name']);
$uploaddir = "/home/scootnz/public_html/images"; // Wherethe files to upload to
copy($_FILES['image1']['tmp_name'],$uploaddir.$_FILES['image1']['name']);
$image1 = $uploaddir.$_FILES['image1']['name'];
$Make=$_POST["Make"];
$Model=$_POST["Model"];
$EngineType=$_POST["EngineType"];
$EngineSize=$_POST["EngineSize"];
$Speed=$_POST["Speed"];
$Wheels=$_POST["Wheels"];
$Price=$_POST["Price"];
$Kilometres=$_POST["Kilometres"];
$Year=$_POST["Year"];
$Brakes=$_POST["Brakes"];
$image2=$_POST["image2"];
$image3=$_POST["image3"];
$ShortDes=$_POST["ShortDes"];
$LongDes=$_POST["LongDes"];
$sql="insert into bikes(Make,Model,EngineType,EngineSize,Speed,Wheels,Price,Kilometres,Year,Brakes,image1,image2,image3,ShortDes,LongDes) values('$Make','$Model','$EngineType','$EngineSize','$Speed','$Wheels','$Price','$Kilometres','$Year','$Brakes','$image1','$image2','$image3','$ShortDes','$LongDes')";
$result=mysql_query($sql,$connection) or die(mysql_error());
header("location: indexadmin.php");}
Thank guys in advance for your help!!