Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #4259

Re: form - file - sumple question

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!newsreader4.netcologne.de!news.netcologne.de!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Date Sat, 07 Jan 2012 16:24:35 +0100
From Luuk <Luuk@invalid.lan>
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version 1.0
Newsgroups comp.lang.php
Subject Re: form - file - sumple question
References <4f08514c$0$5038$ba620e4c@news.skynet.be> <je9jmd$qjl$1@dont-email.me> <b42mt8-398.ln1@luuk.invalid.lan> <je9mac$88i$1@dont-email.me>
In-Reply-To <je9mac$88i$1@dont-email.me>
X-Enigmail-Version 1.3.4
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
Message-ID <gm4mt8-eu8.ln1@luuk.invalid.lan> (permalink)
Lines 48
NNTP-Posting-Host 2001:980:9089:1:216:76ff:fee1:aa6c
X-Trace 1325949901 news.xs4all.nl 6855 [2001:980:9089:1:216:76ff:fee1:aa6c]:35027
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.php:4259

Show key headers only | View raw


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

Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

form - file - sumple question Leo Decap <fcatus@yahoo.com> - 2012-01-07 15:06 +0100
  Re: form - file - sumple question Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-07 09:09 -0500
    Re: form - file - sumple question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-07 15:40 +0100
    Re: form - file - sumple question Luuk <Luuk@invalid.lan> - 2012-01-07 15:40 +0100
      Re: form - file - sumple question Jerry Stuckle <jstucklex@attglobal.net> - 2012-01-07 09:53 -0500
        Re: form - file - sumple question Luuk <Luuk@invalid.lan> - 2012-01-07 16:24 +0100
  Re: form - file - sumple question Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2012-01-07 15:39 +0100
  Re: form - file - sumple question "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2012-01-07 16:10 +0100
  Re: form - file - sumple question Leo Decap <fcatus@yahoo.com> - 2012-01-07 16:24 +0100
    Re: form - file - sumple question Jonathan Stein <jstein@image.dk> - 2012-01-08 16:41 +0100
  Re: form - file - sumple question "Álvaro G. Vicario" <alvaro.NOSPAMTHANX@demogracia.com.invalid> - 2012-01-09 09:38 +0100
  Re: form - file - sumple question "Peter H. Coffin" <hellsop@ninehells.com> - 2012-01-10 13:02 -0600

csiph-web