Results 1 to 4 of 4
  1. #1

    File upload script

    I find an interesting php script that's File Uploader, But can somebody help me in adding these fields to the script :
    the file submitter email address , File description field , submitter name .
    Attached Files Attached Files

  2. #2
    Join Date
    Apr 2007
    Calgary, Canada
    Welcome to WHT randydom.

    If you want to add those fields, just add something similar to
    HTML Code:
    Name: <input type="text" name="name" /><br />
    Email: <input type="text" name="email" /> <br />
    Description: <textarea name="description"></textarea>
    in the file-upload.html file. You will, of course, want to do something with these fields once the user submits the form in your PHP file.

    Good luck

  3. #3
    thank you Kohrar , But please how could i process these fields in the file-upload.php

    Let me suppose that i created 3 fields in the table ( name , email , Desc ). so how is possible to insert these Fields contents into the Fields in table .

    and many thanks in advance

  4. #4
    Join Date
    Apr 2007
    Calgary, Canada
    Are you putting these field content into an SQL database? If so you will need to connect to your sql server, and then an INSERT statement with $_POST['name'], $_POST['email'], $_POST['description'].

    For instance, here is the code I would use if I needed to put it into a mysql database.
    PHP Code:
    // It's a good idea to sanatize the values before using it to prevent sql injection attacks
    $name mysql_escape_string($_POST['name']);
    $email mysql_escape_string($_POST['email']);
    $description mysql_escape_string($_POST['description']);

    // Build your insert query
    $query "INSERT INTO table (name, email, description) VALUES ('$name', '$email', '$description')";

    // Then execute it.
    Since I just quickly typed the code out, please don't yell if it doesn't work.

Similar Threads

  1. Problems with PHP file upload script (1 file)
    By Barti1987 in forum Programming Discussion
    Replies: 1
    Last Post: 04-18-2007, 02:04 PM
  2. Need File Upload Script
    By JohnGladen in forum Other Web Hosting Related Offers
    Replies: 3
    Last Post: 10-28-2006, 11:19 PM
  3. File Upload Script Please
    By go4ram01 in forum Programming Discussion
    Replies: 2
    Last Post: 02-17-2005, 06:39 PM
  4. PhP upload script doesn't upload the file.
    By Nullified in forum Programming Discussion
    Replies: 7
    Last Post: 06-24-2004, 09:46 PM
  5. file upload script
    By cs_gamer in forum Web Hosting
    Replies: 5
    Last Post: 01-07-2004, 10:08 PM

Posting Permissions

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