Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Feb 2013
    Location
    sydney
    Posts
    223

    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
    Create an Upload-File Form

    form action="upload_file.php" method="post"
    enctype="multipart/form-data">
    <label for="file">Filename:</label>
    <input type="file" name="file" id="file"><br>
    <input type="submit" name="submit" value="Submit">

    Create The Upload Script
    <?php
    if ($_FILES["file"]["error"] > 0)
    {
    echo "Error: " . $_FILES["file"]["error"] . "<br>";
    }
    else
    {
    echo "Upload: " . $_FILES["file"]["name"] . "<br>";
    echo "Type: " . $_FILES["file"]["type"] . "<br>";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
    echo "Stored in: " . $_FILES["file"]["tmp_name"];
    }
    ?>

  3. #3
    Registered User webcreations's Avatar
    Join Date
    May 2012
    Location
    India
    Posts
    586
    Same coding is used for uploading php files as discussed by josephlimma.

  4. #4
    Registered User
    Join Date
    Jun 2013
    Posts
    11
    Interesting and very informative , useful post. Thanks for sharing with us.

    portable display stands | portable counters

  5. #5
    Registered User
    Join Date
    Jul 2013
    Posts
    14
    is there any real thread with real discussion in this forum?

  6. #6
    Member
    Join Date
    Sep 2012
    Location
    pune
    Posts
    39
    Hi Luceleng, above thread is real discussion, what kind of discussion and real thread you are looking for here.

  7. #7
    Registered User
    Join Date
    Sep 2013
    Posts
    1
    <html>
    <body>

    <form action="upload_file.php" method="post"
    enctype="multipart/form-data">
    <label for="file">Filename:</label>
    <input type="file" name="file" id="file"><br>
    <input type="submit" name="submit" value="Submit">
    </form>

    </body>
    </html>

  8. #8
    Senior Member
    Join Date
    May 2013
    Posts
    198
    <html>
    <body>

    <form action="upload_file.php" method="post"
    enctype="multipart/form-data">
    <label for="file">Filename:</label>
    <input type="file" name="file" id="file"><br>
    <input type="submit" name="submit" value="Submit">
    </form>

    <?php
    if ($_FILES["file"]["error"] > 0) {
    echo "Error: " . $_FILES["file"]["error"] . "<br>";
    } else {
    echo "Upload: " . $_FILES["file"]["name"] . "<br>";
    echo "Type: " . $_FILES["file"]["type"] . "<br>";
    echo "Size: " . ($_FILES["file"]["size"] / 1024) . " kB<br>";
    echo "Stored in: " . $_FILES["file"]["tmp_name"];
    }
    ?>

    </body>
    </html>

  9. #9
    Registered User
    Join Date
    Mar 2014
    Posts
    95
    Hi there,
    Actually PHP is very demanded tool in SEO because that coding is very amazed for any content but no doubt that is to hard and complicated so that,s why mostly people avoid that because they don,t spent time for it because they don,y know about his very value able aspects that to batter for website growing with PHP .

    Regards:
    Sameer shokat.

  10. #10
    Senior Member
    Join Date
    Nov 2013
    Posts
    347
    I find it very helpful: http://www.w3schools.com/php/php_file_upload.asp. This can be helpful to you too.

  11. #11

  12. #12
    Registered User Geekion's Avatar
    Join Date
    Feb 2015
    Posts
    9
    always check for open-source scripts on sourceforge and read the code to know how it works
    Geekion.com | Pure SSD Hosting Provider | VPS Servers

  13. #13
    Senior Member
    Join Date
    Dec 2014
    Location
    Florida
    Posts
    142
    Wix.com provides a free, easy-to-use online system that allows you create and post your own unique web page. Its highly effective modifying resources & personalized web page styles make building a wonderful web page simple.

Posting Permissions

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

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.