I need users to upload information and pictures

Discussion in 'Programming' started by newinvestor23, May 7, 2009.

  1. #1
    I am not sure if it is PHP or html? I was hoping it could be an easy html, then I can add it in my site easily, but if I can add php in easily, then I will too.
    http://forums.digitalpoint.com/showthread.php?t=1336066
    same post, just over at html side.
    PM me if anyone wants to help and we can decide on price
    thanks
     
    newinvestor23, May 7, 2009 IP
  2. vrnsood

    vrnsood Active Member

    Messages:
    11
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #2
    can u elaborate on this a bit more?
     
    vrnsood, May 25, 2009 IP
  3. Aaron Sustar

    Aaron Sustar Peon

    Messages:
    38
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I posted this exact solution in the other topic as well, but ... just to be sure. :p

    This is a really really (really!) basic version of what you want:

    HTML (file "form.html):
    <form action="process.php" method="post" enctype="multipart/form-data">
       User data 1: <input type="text" id="data1" name="data1" /><br />
       User data 2: <input type="text" id="data2" name="data2" /><br />
       User data 3: <input type="text" id="data3" name="data3" /><br />
       File: <input type="file" id="file" name="file" /><br />
       <input type="submit" id="submit" name="submit" value="Send data" />
    </form>
    HTML:
    PHP (file "process.php"):
    <?php
    if ($post['submit']) {
       $time = time();
       $message = "Data 1: {$_POST['data1']}<br />Data 2: {$_POST['data1']}<br />Data 3: {$_POST['data1']}<br />Uploaded file was moved to the folder 'uploaded' and named {$time}.zip.";
       move_uploaded_file($_FILES['file']['tmp_name'], "uploaded/{$time}.zip");
       mail("your@email.com", "Submitted data", $message);
    }
    ?>
    PHP:
    This script uploads a file to the folder "uploaded" and renames the file to "current_timestamp.zip". This section needs quite a lot of work to meet your needs (I guess).

    Then the script will send all the submitted text data to your email address.

    I hope I helped you with this. ;)
     
    Aaron Sustar, May 27, 2009 IP