Uploader to Mysql tabe.

Hi, I’m trying to save an image to mysql blob with the below scripts, but it doesn’t work. Uploader shows it uploading and then when it get’s to 100% it resets automatically to zero. Can you please assist with the best way to fix this problem. My code is:

<?php require_once('config.php'); (!$_FILES['image']){die('No Image!');} $image = $_FILES['image']; print_r ($image); $query = sprintf("INSERT INTO images (filename, mime_type, file_size, file_data) VALUES ('%s', '%s', %d, '%s')", mysql_real_escape_string($image['name']), mysql_real_escape_string($image['type']), $image['size'], mysql_real_escape_string(file_get_contents($image['tmp_name']))); /* HTML5/FLASH MODE (MODE will detected on client side automaticaly. Working mode will passed to server as GET param "mode") response format if upload was good, you need to specify state=true and name - will passed in form.send() as serverName param {state: 'true', name: 'filename'} */ if (@$_REQUEST["mode"] == "html5" || @$_REQUEST["mode"] == "flash") { $filename = $_FILES["file"]["name"]; move_uploaded_file($_FILES["file"]["tmp_name"],"uploads/".$filename); print_r("{state: true, name:'".str_replace("'","\\'",$filename)."'}"); } Thanks, Brian

Hi
To reproduce the issue and help you we need a direct link to your priject or completed demo.
Please, provide it on support@dhtmlx.com with a link on this topic.
docs.dhtmlx.com/doku.php?id=othe … leted_demo