close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Value not inserting

Thread began 9/11/2019 12:58 pm by Steve | Last modified 9/12/2019 10:06 am by Ray Borduin | 269 views | 4 replies |


Value not inserting / Dropzone.js Drag and Drop uploader

I’m lost… Using a working drag and drop (dropzone.js) from one site to another and can not get 1 value (kind) to be inserted into a record.

if (!empty($_FILES)) {
WA_DFP_UploadFiles("WA_UploadResult1", "file", "0", "", "true", $WA_UploadResult1_Params);
if (!empty($_FILES)) {
$InsertQuery = new WA_MySQLi_Query($tgdesign_i);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "posts";
$InsertQuery->bindColumn("image", "s", "".$WA_DFP_UploadStatus["WA_UploadResult1"]["serverFileName"] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("kind", "i", "".$_SESSION['type'] ."", "WA_DEFAULT");
$InsertQuery->bindColumn("dateAdded", "t", "".((isset($_POST["hiddenDateTime"]))?$_POST["hiddenDateTime"]:"") ."", "WA_DEFAULT");
$InsertGoTo = "";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";

Forcing a value of 63 into a new record insert and WORKS:
$InsertQuery->bindColumn("kind", "i", "63", "WA_DEFAULT”);

But anything dynamic FAILs such as:
Taking the value from a URLQuery into a var: <?php $type = $_GET["type"]; ?>

$InsertQuery->bindColumn("kind", "i", "".$type ."", "WA_DEFAULT");

Or from a Recordset:
$InsertQuery->bindColumn("kind", "i", "".($rsType->getColumnVal("typeId")) ."", "WA_DEFAULT”);

Or from a Session value:
$InsertQuery->bindColumn("kind", "i", "".$_SESSION['type'] ."", "WA_DEFAULT”);

I've checked the DB to confirm it's an Integer column which is it. Not sure what else to check.

Sign in to reply to this post


Private Message

Sign in to reply to this post


While my "other" version on a different site works well as a single page, this one required putting the File Upload and Insert Record code on a separate page.

So far look like this is the solution.

Sign in to reply to this post

Ray BorduinWebAssist

Most likely the $_GET variable and $_SESSION variable aren't being set in the right order or aren't being passed to the insert page properly when doing it on multiple pages. I'm sure I could debug it, but if you have a workaround that is better than me spending a bunch of time debugging code from another provider.

Sign in to reply to this post
Did this help? Tips are appreciated...


The values are present as I echo them in a latter place on the page. Also, I've done multiple means to introduce the value needed, $_GET, $_SESSION, $var and even a direct value put in the Insert routine.

I agree don't waste any debug time on this as I have already spent a considerable amount of time and now have a working solution. It's just that in the back of my mind I have the same coding logic working on a different site and now have this mystery why one site is different from the other.

Thank for offering Ray,

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question





Ease of use


security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...