My content management system allows the user to edit their page and it
shows a thumb of their existing image. They can choose to upload a
new image, or leave it alone (the old image file name is stored in a
hidden field)
So I have the image upload handling looking like this:
if ($_FILES['pageimage'])
{
(code that determines the type, gives it a name, etc)
copy($_FILES['pageimage']['tmp_name'],
"/home/fpcreatv/public_html/images/uploads/$newfile");
The problem is, even if there is no new file specified, IT RUNS THE
[EMAIL PROTECTED] CODE ANYWAY!
I thought by saying if ($_FILES['pageimage'])
{ yadda }
that it will only run the image processing code if that incoming file
is there. This is making me nuttier than I already am.
--- In [email protected], Brian Cummiskey <[EMAIL PROTECTED]> wrote:
>
> Marian Briones wrote:
> > I posted yesterday and no one answered; I"m wondering if this list is
> > having tech difficulties....
>
> I RARELY get the first post of a thread for some reason. And not just
> on this list, on most of my yahoo lists....
>
> > But why is it still passing in a value for $_FILES['thefield'] anyway
> > when there isn't anything in that field for upload?
>
> Any way you can post up the code block in question?
>
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/