Reply to Re: Image problem with $_FILES and $_POST

Your name:

Reply:


Posted by Jerry Stuckle on 12/29/07 20:38

Karl wrote:
> On 29 Des, 19:51, Jerry Stuckle <jstuck...@attglobal.net> 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@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация