WEB Fucking Uploader Script... PHP People

Discussion in 'OT Technology' started by brds, Oct 22, 2009.

  1. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,650
    Likes Received:
    15
    Location:
    Atlanta
    I need to be able to upload zip files on my new project. here's what i've got for the first part of the page.

    Code:
    <form action="process.php" method="post" name="uploadform" enctype="application/x-zip-compressed">
        <input type="file" name="bin" size="50" />
        <input type="submit" value="Add Binz &gt;&gt;">
    </form>
    

    Now, in the process.php page, when i var_dump($_FILES), i'm getting a NULL.

    Any ideas?
     
  2. ge0

    ge0 New Member

    Joined:
    Oct 31, 2005
    Messages:
    8,398
    Likes Received:
    0
    Location:
    JERSEY
    post the process.php, i'll help
     
  3. Pepsi1975

    Pepsi1975 Mod of the Year

    Joined:
    Jan 6, 2005
    Messages:
    47,590
    Likes Received:
    1
    Location:
    Detroit
    if ge0 can't or not around when you post it, hit shampoo up also
     
  4. ge0

    ge0 New Member

    Joined:
    Oct 31, 2005
    Messages:
    8,398
    Likes Received:
    0
    Location:
    JERSEY
    btw I hope your doing var_dump($_FILE['bin']);

    also heres some other tid bits..

    $file_type = $_FILES['bin']['type'];
    $file_name = $_FILES['bin']['name'];
    $file_ext = strtolower(substr($file_name,strrpos($file_name,".")));
    $file_size = $_FILES['bin']['size'];
     
  5. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,650
    Likes Received:
    15
    Location:
    Atlanta
    Right now, i'm just doing a var_dump($_FILES['bin']) and var_dump($_POST['bin']). The post works fine, the FILES returns a null.
     
  6. ge0

    ge0 New Member

    Joined:
    Oct 31, 2005
    Messages:
    8,398
    Likes Received:
    0
    Location:
    JERSEY
    try changing your enctype to enctype="multipart/form-data"
     
  7. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,650
    Likes Received:
    15
    Location:
    Atlanta
    bingo
     

Share This Page