okay, I've got me hands on a little bit of code to upload a file ive submitted with a form, which looks something like this :
Code:
if ($img1_name != "") {
@copy("$img1" , "/home/admin/www/fileupload/$img1_name")
or die("Couldn't Upload Your File.");
} else {
die("No File Specified");
}
I then modified it, with the intention to change the directory i was uploading to, not knowing my whole path, and also to assign a variable which would point to the image to be put into my database
Code:
if ($pic_name != "") {
@copy("$pic" , $PHP_SELF."/imgs/") ;
$pic_url = $PHP_SELF."/imgs/".$pic_name;
$wasuploaded = "1";
}
the file got there okay (i can get name and size etc.) and APPANRENTLY it was uploaded (the $wasuploaded was true) but the copy command didn't seem to do anything.
What i do wrong?