This forum is a community forum meant for users of the plugin to collaborate and help solve issues with implementation, etc. Unfortunately, as the creator of the plugin, I do not have much time to attend to every request here as this is only a side project and I must work a full-time job to provide for my family. This is how I keep the Flash version free and the HTML5 version low cost.
UploadiFive 1.1.1 has been released which includes a small fix for added support on touch devices including iOS 6 devices.
  • hello dear friends please help me how can i add the mysql query when file is uploaded thanks
  • ok just let me know is it possible?
  • Yes it is. You just need to learn php and sql. Most people are putting this type of query in the upload script
  • its not working i try many times but its not working i right somple quries

    <?php<br />
    $con = mysql_connect("localhost","root","pass");
    mysql_select_db("model",$con);

    if (!empty($_FILES)) {
    $tempFile = $_FILES['Filedata']['tmp_name'];
    $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_GET['folder'] . '/';
    $targetFile = str_replace('//','/',$targetPath) . $_FILES['Filedata']['name'];

    // Uncomment the following line if you want to make the directory if it doesn't exist
    // mkdir(str_replace('//','/',$targetPath), 0755, true);

    move_uploaded_file($tempFile,$targetFile);
    mysql_query("DELETE FROM md_u_profile WHERE mdu_p_id = 13 ");

    }
    echo "1";
    ?>
  • The problem is with your query, you have a delete query:
    mysql_query(\"DELETE FROM md_u_profile WHERE mdu_p_id = 13 \");


    You need an insert query:
    INSERT INTO table SET 
    name ='${fileName}',
    filePath ='${targetFile}',
    content_type ='${content_type}'


    This is assuming you have created a table in your database called "table" and have columns called "name" and "filePath".

    Please sanitize your database inputs. (do you know "little bobby drop tables?"

    If you have any questions regarding the creation of a database or about sanitizing your inserts, you can check the tutorials at: http://www.w3schools.com/php/php_mysql_insert.asp
  • hi there,
    I put my query into uploadify.php file, but it doesn't work yet.

    here's my code (with comments, hope it helps):

    // I added this line due to avoid spaces in names
    $name_file_ok = str_replace(" ","_",$_FILES['Filedata']['name']);
    // I changed this line with my var instead of $_FILES['Filedata']['name']
    $targetFile = str_replace('//','/',$targetPath) . $name_file_ok;

    //this is my query; I have a table called "foto_table" with 4 cols called "name_foto" etc.
    //the id_album variable is passed by the URL of the page;
    //the only field I NEED to put in my table is $name_file_ok (of course, one for each uploaded file;

    $query = 'INSERT INTO foto_table (name_foto, descr_foto, id_album, name_file) VALUES ("'.$name_foto.'","'.$descr_foto.'","'.$_GET['id_album'].'","'.$name_file_ok.'")';

    mysql_query($query) or die ('Could not connect: ' .mysql_errno().': '.mysql_error().'<BR />');


    my point is:
    i can upload multiple files, and that's ok, but of course i need to insert multiple rows in my database while uploading files.
    How can I do that?

    any help is welcome :)
    thank you
    have a nice day
    d.
  • SHAME ON ME!

    i forgot to connect to my database... :(

    thanks anyway :D