Hey.. i have script that works fine on a previous page i've done but when using it on another page, it gives me problems.. The difference is that previously, the form would call itself when 'submit' was clicked but this time i'm calling a different page.
I have 'browseavatar.php' and 'uploadavatar.php'. The first contains the form where the user can browse for their file and click submit... the second page is where the actual uploading of the image happens. When i click 'submit' though, i get: 'Error: Please select a file to upload!' which is being generated by this:
if (!is_uploaded_file($_FILES['filetoupload']['tmp_name']))
{
echo "Error: Please select a file to upload!. <br><a href=\"browseavatar.php\">back</a>";
exit(); //exit the script and don't do anything else.
}
So obviously nothing is being passed through to 'uploadavatar.php'.
Can anyone help me please or point out what i'm missing. Hopefully this all makes sense. Cheers,
BIOSTALL