Re: Redisplay file name on failed upload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Brad Fuller wrote:
>> Is it possible to assign form[ upldFile ] = "C:\somepath\somefile"
>> or
>> form[ upldFile ] = $_FILES['userfile']['name']
> 
> The "value" attribute of the <input type="file"...> tag is not able to be
> altered or pre-populated for obvious security reasons.
>  
>> The script which does the validation is the same one which contains the
>> upload form. I suspect we're completely out of luck - apart from
>> validating
>> with JavaScript.
> 
> Yup.

well no - you don't have any certainty that the javascript is even being run.
you still have to check everything server side and assume the javascript was
circumvented.

javascript validation is purely a mechanism to aid the user - i.e. it makes the form
more responsive for honest users with a javascript *enabled* browser by eliminating
superfluous trips to the server.

> 
> -Brad
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux