0

Regarding my question here : PHP uses GET method

I have PHP 5.3.27 on the server that I use and I always get the files I upload in $_REQUEST, while $_FILES array is always empty ...Why? I am using enctype="multipart/form-data" on my form.

EDIT:

Here is my form :

<form action="addScript.php" methot="POST" enctype="multipart/form-data">
            <tr>
                <td>Produt name : </td><td><input type="text" name="name" id="name" /></td>
            </tr>
            <tr>
                <td>Product description : </td><td><textarea rows="5" cols="40" name="description" id="description"></textarea></td>
            </tr>
            <tr>
                <td>Price (USD $) : </td><td><input type="text" name="price" id="price" /></td>
            </tr>
            <tr>
                <td>Profile Picture : </td><td><input type="file" name="profilepic" id="profilepic" /></td>
            </tr>
            <tr>

                <td>Other pictures : </td><td>
                <div id="pictures" style="border:1px solid black;"><table>
                <tr><td>1</td><td><input type="file" id="pic1" name="pic1" /></td></tr>
                <tr><td>2</td><td><input type="file" id="pic2" name="pic2" /></td></tr>
                <tr><td>3</td><td><input type="file" id="pic3" name="pic3" /></td></tr>
                </table>
            </div>
            </td>
        </tr>
        <tr>
            <td></td><td><input type="submit" value="Add" /></td>
    </form>
Community
  • 1
  • 1
Daniel Bejan
  • 1,468
  • 1
  • 15
  • 39

1 Answers1

0

You get the following information for each file:

$_FILES['field_name']['name']
$_FILES['field_name']['size']
$_FILES['field_name']['type']
$_FILES['field_name']['tmp_name']
Albzi
  • 15,431
  • 6
  • 46
  • 63
DDphp
  • 479
  • 2
  • 5
  • 17