so, after reading a bunch of stuff i'm still confused about tmp_name.
my code looks as follows:
if (is_uploaded_file($FILES['aimage']['tmp_name'])) {
$pic = $FILES['aimage']['name'];
$array = explode (".",$pic);
$i = count($array);
$extension = strtolower($array[$i-1]);
$aimage = "$artist_id.$extension";
$move = move_uploaded_file($_FILES['aimage']['tmp_name'], "/new/images/artists/".$aimage);
when i test my code and attempt to upload a picture associated with the artist i recieve the following error:
Warning: move_uploaded_file(/new/images/artists/35.jpg): failed to open stream: No such file or directory in /home/prg/public_html/new/process.php on line 95
Warning: move_uploaded_file(): Unable to move '/var/tmp/php312Rvl' to '/new/images/artists/35.jpg' in /home/prg/public_html/new/process.php on line 95
now, i'm guessing it's because the web user doesn't have access to the /var/tmp folder because it appears the file isn't being created.
my question i guess is where/how do i declare that darn tmp folder in my code?
thanks much in advance!
justin