- 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.
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.