Hi all
I have been trying to run a form with a FILE field through an upload script I have written
If the user decided not to include a file the form must be prcessed through on part of the script, and if they did through another. I have tried too run this through several if else statements, but the form is processed through one or the other depedant on state.
Below are some of the options I tried.
I can make the script go to one or the other options easily, but it fails to acknowledge both depedant upon an empty field. Am I barking up the worng tree here with regards $_FILES ?PHP Code:if (!isset($_FILES['fieldname'])){
Do this
}
else
{
Do this
}
if (!isset($_POST['fieldname'])){
Do this
}
else
{
Do this
}
if ($_FILES['fieldname'] = 0){
Do this
}
else
{
Do this
}
if ($_POST['fieldname'] = 0){
Do this
}
else
{
Do this
}
if ($_FILES['fieldname'] = 0){
Do this
}
else if ($_FILES['fieldname'] > 0){
Do this
}
if (!isset($_FILES['fieldname'] )){
Do this
}
else if (isset($_FILES['fieldname'] )){
Do this
}
All help appreciated, and thatnks are in advance.





.

Bookmarks