PHP file uploading question (update)

BeauJangles

Lifer
Aug 26, 2001
13,941
1
0
hey guys,

So i stole some code from a tutorial (codewalkers to be specific... it is the attached code) and stuck it in its own form, it's own folder and all that. It can upload images fine. I then took that code, once I confirmed it worked, and stuck it back in my big register.php file and process.php file, but to no avail. It still refuses to work even though when I print_r the $_FILES array I get:

Array
(
[file] => Array
(
[name] => mamut.JPG
[type] => image/jpeg
[tmp_name] => /tmp/phpcjBALl
[error] => 0
[size] => 15871
)

)

and the code itself prints out:

Uploading mamut.JPG (image/jpeg, 16 Kb).
File has been stored in your uploads directory.

Why does php hate me?! The code works fine when it is alone, but won't work in this larger script! Why? Everything seems fine EXCEPT that it never actually uploads the image.
 

Modeps

Lifer
Oct 24, 2000
17,254
44
91
While I've worked a lot with PHP, I've never actually uploaded a file. Make sure the destination directory is writable by the webserver. That's all the help I can offer :( Sorry, consider this a free bump.
 

BeauJangles

Lifer
Aug 26, 2001
13,941
1
0
bump

edit: figured it out. It was just that my ftp client doesn't automatically refresh. So it wasn't displaying the uploaded images.