Form not submitting files

For some reason the following form is not submitting the file as it should and I am not sure why on the server side if I check $ _FILES it is always empty, but if I say say $ _POST ['article'] which only obey fine so only the file is not received and does anyone see something wrong with that?

                <form action="newindex.php?do=submit" enctype="multipart/form-data" method="post">
                    Subject:<br>
                    <input type="text" id="subject" name="subject"><br>
                    <textarea id="article" id="article" name="article"></textarea><br>
                    <div class="sliderimage"><h2 class="blockhead">Slider Image:</h2>
                    <table><tr><td><b>Image:</b><br>Dimensions should be 640x360.</td><td>
                    <input type="file" id="image" name="image"></td></tr>
                    <tr><td><b>Transition:</b></td><td>
                    <select id="transition" name="transition">
                        <option value="">Random</option>
                        <option value="sliceDown">slideDown</option>
                        <option value="sliceDownLeft">sliceDownLeft</option>
                        <option value="sliceUp">sliceUp</option>
                        <option value="sliceUpLeft">sliceUpLeft</option>
                        <option value="fold">fold</option>
                        <option value="fade">fade</option>
                        <option value="slideInRight">slideInRight</option>
                        <option value="slideInLeft">slideInLeft</option>
                        <option value="boxRandom">boxRandom</option>
                        <option value="boxRain">boxRain</option>
                        <option value="boxRainReverse">boxRainReverse</option>
                        <option value="boxRainGrow">boxRainGrow</option>
                        <option value="boxRainGrowReverse">boxRainGrowReverse</option>
                    </select></td></tr>
                    <tr><td><b>Caption:</b></td><td>
                    <input type="text" id="caption" name="caption"></table><br></div>
                    <input type="hidden" name="securitytoken" value="<?php echo $vbulletin->userinfo['securitytoken'] ?>" />
                    <div class="center"><input type="button" value="Preview" class="preview"><input type="submit" name="submit"></div>
                </form>

      

+3


source to share


2 answers


You must have an input specifying the maximum file size:



http://www.php.net/manual/en/features.file-upload.post-method.php

+3


source


put the size attribute on the value and it will work.



<input id="image" name="image" type="file" size = '50'"/>

      

0


source







All Articles