#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    27
    Rep Power
    0
    How do I make a file upload script with php3?
    I tried php4 but my ISP doesnt support that version.

    How do I copy the file i selected by browsing on my pc to the server (of course I know the function copy, but what variables do i have to use?)

    Thanks in advance
    Pieter
  2. #2
  3. Full Access
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jun 2000
    Location
    London, UK
    Posts
    2,019
    Rep Power
    17
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    <form method=POST action=upload.php3>

    File:<input type=file name=file>

    <input type=submit value=upload>

    </form>
    [/code]
    Chmod the directory you're uploading to writeable.

    Then use the copy function in the PHP script to copy $file to your directory. Make the directory absolute.

    --------------------------------------------
    Alex
    (http://www.alex-greg.co.uk)

Similar Threads

  1. Replies: 1
    Last Post: February 8th, 2004, 02:59 PM
  2. PHP file upload script trouble
    By casbboy in forum PHP Development
    Replies: 9
    Last Post: February 5th, 2004, 08:42 PM
  3. how to upload text file into blob field
    By misoz in forum MySQL Help
    Replies: 8
    Last Post: February 5th, 2004, 03:48 AM
  4. file upload problem
    By user# 63632 in forum PHP Development
    Replies: 4
    Last Post: February 1st, 2004, 01:41 AM
  5. php-sql file upload and download
    By mthroesch in forum PHP Development
    Replies: 0
    Last Post: January 28th, 2004, 02:56 AM

IMN logo majestic logo threadwatch logo seochat tools logo