Jump to content

[SOLVED] how to test for image upload presence where there are several form items


brianstorm

Recommended Posts

Hi,

 

 

I am attempting to create a php / mysql data entry page which also has an image upload function. It all works fine apart from where I have no image to upload (which may be the case).... I have a form of the following type

 

method="POST" enctype="multipart/form-data">';

 

with this item in the form  echo  '<input type="file" name="image">';

 

which is processed on another page... so I am looking for something along the lines of  this

 

if(isset($_POST['image'])) {  run my image upload code }

 

but this doesn't seem to work.... all the image upload code I have seen tests for the value of the submit button, which in this case will always exist... I really don't want to have more than one form if it can be avoided... if anyone can help point me in the right dircetion it would be greatly apperecciated....

 

 

many thanks

 

 

brian....

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.