FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » form - file - sumple question
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: form - file - sumple question [message #176452 is a reply to message #176448] Sat, 07 January 2012 15:24 Go to previous messageGo to previous message
Luuk is currently offline  Luuk
Messages: 329
Registered: September 2010
Karma:
Senior Member
On 07-01-2012 15:53, Jerry Stuckle wrote:
> On 1/7/2012 9:40 AM, Luuk wrote:
>> On 07-01-2012 15:09, Jerry Stuckle wrote:
>>> On 1/7/2012 9:06 AM, Leo Decap wrote:
>>>> Hi,
>>>>
>>>> I have a form which users can fill in.
>>>> If the user hasn't filled in a required field, the form reloads after
>>>> the Submit with all the data the user has entered filled in (and the
>>>> opportunity to fill in the missing data).
>>>> I get the data through $_POST and echo the allready filled in data on
>>>> the form. Easy.
>>>>
>>>> I have 1 field - type File - where the user can choose a photo to
>>>> upload.
>>>> On reload of the form, I would love to see the entered data (path?)
>>>> reappear, but I can't figure out how to do this..........
>>>>
>>>> Any help here would be appreciated.
>>>>
>>>> Leo
>>>
>>> You can't do it. For security reasons, HTTP will now allow FILE fields
>>> to be filled in.
>>>
>>
>> I suggest you (Leo) to take a look at JavaScript, to do simple checks if
>> a field is filled in or not.
>>
>> For the complicated checks, you might still want to use some PHP stuff
>> afterwards....
>>
>
> I don't think javascript will allow it either, Luuk. It would be a huge
> security concern.
>
> Can you imagine what hackers could do if they could put an invisible
> FILE field on a page and get any file on your system without your
> knowledge?
>

Yeah, i can imaginge, but, in the original question, it started with:
"If the user hasn't filled in a required field"
and THAT is something you can check using javascript without ANY
security issues.

--
Luuk
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Best PHP Training | PHP Development Training | PHP Training Institute
Next Topic: Running function in the background?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Dec 01 07:10:22 GMT 2024

Total time taken to generate the page: 0.04458 seconds