Uploading a file
Posted: Tue Jul 10, 2007 10:01 pm
I have a register form that allows a user to upload an icon.
My scripts look alright, but the problem is that the $_FILES variable is not storing any information about the file being uploaded; I think it may be because I'm not loading a complete new page. Instead my form sends user data to a javascript function which then sends a post request to a register script.
I'm not quite sure, but I think the problem is that I'm not loading a new page so there's no way to update the $_FILES['icon'][*] fields.
How can I get around while still keeping intact my current setup?
My scripts look alright, but the problem is that the $_FILES variable is not storing any information about the file being uploaded; I think it may be because I'm not loading a complete new page. Instead my form sends user data to a javascript function which then sends a post request to a register script.
Code: Select all
<?php
// Not storing anything (register script)
$_FILES['icon']['tmp_name'];
?>How can I get around while still keeping intact my current setup?