dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: How can we upload files in PHP?

  1. #1
    Join Date
    May 2013
    Posts
    119

    How can we upload files in PHP?

    Hi friends,
    How can we upload files in PHP? i want that user can be post own resume file through form. please tell me php script for that.
    thanks for any reply.

  2. #2
    Join Date
    Dec 2012
    Posts
    167
    Using a form with a file input which is then captured by PHP which moves the file into a folder

    HTML Code:
    <form method="post" enctype="multipart/form-data">
        <input type="file" name="resume">
        <input type="submit"
    </form>
    
    <?php
        if(isset($_FILES['resume'])) {
            $file = $_FILES['resume']['tmp_name'];
            $path = "/files/".$_FILES['resume']['name'];
            move_uploaded_file($file,$path);
        }
    ?>

  3. #3
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,616
    Check out the "sticky" thread near the top of this forum on uploading images. (Just ignore any parts that would only apply to image manipulation.)
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  4. #4
    Join Date
    May 2003
    Posts
    599
    The important thing to remember is not to overcomplicate it...uploading a file in PHP is very simple and can be done in a few lines of code...it is actually more complicated adding security to it, so my suggestion would be to get the upload working (maiking sure webserver has write permission to the folder, etc), then begin to lock it down and secure the input.

  5. #5
    Join Date
    Feb 2012
    Location
    Noida, India
    Posts
    4
    I also agree with all above answers and we suggest for my developers. The knowledge of PHP basis uploading is more complicated thing for developers so if you are new person in php http://www.csschopper.com/hire-dedic...essional.shtml then you can also hire any experiance developers from any company. I know that experienced company can solve your problem. I hope you also take CSS Chopper.com company for hiring of any kind of PHP developers.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles