Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jun 2007
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts

    FF6 Doesn't Upload Files

    This form doesn't even upload an image in firefox6

    PHP Code:
    <form name='adminList' action='actions/tryupdateitem.php' method='post' enctype='mutlipart/form-data'>    
        <
    input type='hidden' name='table' value='images'>        
        <
    input type='hidden' name='id' value='56'>    
        <
    input type='hidden' name='xhashxtagx' value=''>
        <
    table id='itemTable' width='50%'><tbody><tr><td>categoryId</td><td><select name='categoryId'><option value='1' >Project Floorplans</option><option value='2' >General</option><option value='3' >Slideshow</option><option value='4' >Project Elevations</option><option value='5' >Project Photos</option><option value='6' >Home Images</option><option value='7' >Home Elevations</option><option value='8' >Home Floorplans</option><option value='9' >Phase Images</option><option value='10' >Award Images</option><option value='11' >Association Images</option><option value='12' SELECTED>Gallery</option><option value='13' >Testimonial Images</option><option value='14' >Client Images</option><option value='15' >Process</option></select></td></tr><tr><td>title</td><td><input type='text' name='title' value='title'/></td></tr><tr><td>source</td><td>
            <
    input type='hidden' name='source' value='xcheckxfilex'>
            <
    img src='../images/uploaded/833056997507810apple.jpg'/>
            <
    br/>
            
    Upload New Image: <input type='file' name='test'>
            </
    td></tr></tbody>
        </
    table>
        <
    div id='listFooter'>
            <
    button type='button' class='btn'>Update</button>
        </
    div>
    </
    form
    print_r($_FILES);

    Show nothing. Am I missing something?

  • #2
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,304
    Thanks
    57
    Thanked 525 Times in 512 Posts
    Blog Entries
    5
    Shouldn't you be using <input type="submit" value="Update"> ?
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #3
    New Coder
    Join Date
    Jun 2007
    Posts
    62
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My button class checks and submits the form. It works great in chrome but the file never gets uploaded in FF. In chrome it takes a bit of time while it's uploading the file information but in FF6 it goes straight to the page and the $_FILES array is empty. I'm guessing it's not uploading the file for some reason

  • #4
    Super Moderator Inigoesdr's Avatar
    Join Date
    Mar 2007
    Location
    Florida, USA
    Posts
    3,642
    Thanks
    2
    Thanked 405 Times in 397 Posts
    Quote Originally Posted by groog View Post
    My button class checks and submits the form. It works great in chrome but the file never gets uploaded in FF. In chrome it takes a bit of time while it's uploading the file information but in FF6 it goes straight to the page and the $_FILES array is empty. I'm guessing it's not uploading the file for some reason
    Well, the code you posted by itself, which doesn't even contain any PHP, doesn't submit the form. So, it's hard to fault FF for the form not working based on this. Post everything that is needed to submit the form, or change your update button to an <input type="submit" value="Update" />

  • #5
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,304
    Thanks
    57
    Thanked 525 Times in 512 Posts
    Blog Entries
    5
    Quote Originally Posted by groog View Post
    My button class checks and submits the form. It works great in chrome but the file never gets uploaded in FF. In chrome it takes a bit of time while it's uploading the file information but in FF6 it goes straight to the page and the $_FILES array is empty. I'm guessing it's not uploading the file for some reason
    As Inigoesdr says you either need to show more PHP handling code or change your button (which I've also suggested).

    Even with your current button I believe it should still be <input type="button" value="Upload">

    Not <button ..>
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •