Re: Image problem with $_FILES and $_POST



Karl wrote:
On 29 Des, 19:51, Jerry Stuckle <jstuck...@xxxxxxxxxxxxx> wrote:
OK, did you write this yourself? Or is this someone else's script?

No it's mine :)

If the latter, that's who you should be asking.

And <input type="file"...> and <input type="hidden"...> have two
entirely different uses.

Yes, I know.

And sure - if you comment out the $_FILES line, there is no way for the
file field will work.

Yes, of course. I do it just to try what would happen.

Anyway. If I select to post the image.jpg by the file field on the
"edit" page. It work.
I had hoped to find a way to "transfer" it through this different view
of forms without post it a second time.

Karl


OK, this is a little more clear now.

The only way you can get data from one page to another is either via a form field or the $_SESSION variable.

In a case like this, I'd just use the hidden field to pass the old name. If the user uploads a new file, use it. Otherwise just use the old file (the one passed in the hidden field).

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================

.



Relevant Pages

  • Re: How to retain user input in a form file field ?
    ... hidden field containing a client path will send data as a file field ... It would be a security hazard if it did. ...
    (alt.html)
  • Re: How to retain user input in a form file field ?
    ... all values are retained unless the file field one. ... server already. ... already uploaded file, ... I've read from url below that an hidden field conatining a ...
    (alt.html)
  • Re: How to retain user input in a form file field ?
    ... Yohan N. Leder wrote: ... do you confirm or not that an hidden field containing a client ... path will send data as a file field does? ...
    (alt.html)
  • Re: Image problem with $_FILES and $_POST
    ... I have a form for posting news articles. ... Form one is the "register" form. ... If I select edit, I got the "edit form" and if I select accept, I ... BUT if I use the file field and browse, select an image and post it. ...
    (comp.lang.php)
  • Re: Image problem with $_FILES and $_POST
    ... I have a form for posting news articles. ... Form one is the "register" form. ... If I select edit, I got the "edit form" and if I select accept, I ... BUT if I use the file field and browse, select an image and post it. ...
    (comp.lang.php)