1

Topic: How can I add image at database using MC image manager standalone

I have used MC image manager as standalone at my website for multiple image upload system. Now I can upload multiple image. But I can not add this at database. I can not understand how can I do that. Pls help me with details.

2

Re: How can I add image at database using MC image manager standalone

You can either write your own plugin and listen for the ADD file action and then add it to the database or you could use the standalone integration model and let the user pick files to insert into the database. It depends on how your application works.

Best regards,
Spocke - Main developer of TinyMCE

3

Re: How can I add image at database using MC image manager standalone

<?php
include ("dbconnect.php");

extract($_POST);
//get uploaddir

$rand = time();
        $uploaddir = 'imagemanager/files/';
        $fnme = $rand."_".basename($_FILES['cimg']['name']);       
        $uploadfile = $uploaddir . $fnme;
        move_uploaded_file($_FILES['cimg']['tmp_name'], $uploadfile);


$sql = "INSERT INTO album ( `al_image`)
        VALUES ('$uploadfile')";
    $result= mysql_query($sql);

            if ($result)
                {
                    echo " Success";
                }
            else
                {
                    echo " failed";
                }

?>


I use this code at action page for upload image...... But this can not add information at database.... I don't know what I have to do