Results 1 to 18 of 18

Thread: [RESOLVED] Get file information

Threaded View

  1. #13

    Thread Starter
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Get file information

    There are no errors! The code just stops working I will add a separate field for the file upload see if it makes a difference.

    Edit:

    I tried putting this code:

    PHP Code:
    $MAXIMUM_FILESIZE 1024 200// 200KB
    $MAXIMUM_FILE_COUNT 10// keep maximum 10 files on server
    //echo exif_imagetype($_FILES['Filedata']);
    if ($_FILES['sendfile']['size'] <= $MAXIMUM_FILESIZE) {
    move_uploaded_file($_FILES['sendfile']['tmp_name'], "./temporary/".$_FILES['sendfile']['name']);
    //if ($type == 1 || $type == 2 || $type == 3) {
    rename("./temporary/".$_FILES['sendfile']['name'], "./images/".$_FILES['sendfile']['name']);

    Above the code for the database plus using:

    HTML Code:
    <form action="<?php $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data" name="products" target="_self">
    <input type="hidden" name="MAX_FILE_SIZE" value="30000" />
    <label class="login-label" for="product">Product Name:</label><br /><input name="pName" type="text" id="pName"/>
    <br /><label class="login-label" for="pPrice">Product Price:</label> <br />
    <input name="pPrice" type="text" id="pPrice" />
    <br />
    <label class="login-label" for="pImagePath">Image Path:</label><br /><input name="pImagePath" type="type" id="pImagePath"/>
    <br /><label class="login-label" for="pImageType">Image Type:</label> <br />
    <input name="pImageType" type="text" id="pImageType" />
    <br /><label class="login-label" for="pImageType">Upload File:</label> <br />
    <input name="sendfile" type="file" id="sendfile" />
    <br />
    <input name="submit" type="submit" value="Submit" />
    <input name="reset" type="reset" value="Reset" />
    </form>
    However, the file sending doesn't work while the database input mysteriously works. I think part of the problem in the caching in Firefox.
    Last edited by Nightwalker83; Nov 21st, 2009 at 12:08 AM. Reason: Adding more
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

Posting Permissions

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



Click Here to Expand Forum to Full Width