hi,
I just completly lost it right now. Kinda wanna take my head and run into the wall. I used the code from work deleted all sorts of code which relates to work (like add to database etc and tried file upload.. it worked!?!?!?
so i copy and paste the code into my test.php and upload.php.. doesnt work.. copy the 2 airfrance files to my working on project root and the code works and i upload files. i then copy the code into my real upload functions folder and now this code works
$userdir = $_SESSION['valid_user'];
echo $uploaddir = 'images/'.$userdir.'/';
@mkdir ($uploaddir,666);
$uploadfile = $uploaddir . $_FILES['userfile']['name'];
$src = $uploadfile;
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) {
echo "done";
}
see the thing is i tried move before and i tried folder $uploaddir = 'images/'; as well and it didnt work but now it does work..???!!!
i dont understand but hey i will code from this on. 7 hours 1 small problem.. dam!