close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

"Undefined Index" error with insert multiple records behavior

Thread began 2/28/2019 9:41 am by Justin@AdventDesign | Last modified 3/01/2019 9:08 am by Justin@AdventDesign | 439 views | 5 replies

Justin@AdventDesign

Found the skip if empty... which has stopped the repetition, but no matter what I select, I can't seem to find the right variable for the option table id (tbl_homes) repeated from the rsHomes recordset. It just repeats null or 0. Any direction on what I'm looking for?

<?php
if (isset($_POST["Insert"]) || isset($_POST["Insert_x"])) {
$MultipleInsertConnection = $framework_connect;
$MultipleInsertTable = "rel_images";
$MultipleInsertRedirect = "tbl_images_results.php";
$MultipleInsertCheck = "rel_homes";
$MultipleInsertIdentifier = 'wamultiinsert_1';
for ($mi=0; $mi<sizeof($_POST[$MultipleInsertIdentifier]); $mi++) {
$MultipleInsertCount = $_POST[$MultipleInsertIdentifier][$mi];
if (($MultipleInsertCheck == "" || (isset($_POST[$MultipleInsertCheck.'_'.$MultipleInsertCount]) && $_POST[$MultipleInsertCheck.'_'.$MultipleInsertCount]!=""))) {
$InsertQuery = new WA_MySQLi_Query($MultipleInsertConnection);
$InsertQuery->Action = "insert";
$InsertQuery->Table = $MultipleInsertTable;
$InsertQuery->bindColumn("home_id", "i", "".((isset($_POST["wamultiinsert_1"."_".$MultipleInsertCount]))?$_POST["wamultiinsert_1"."_".$MultipleInsertCount]:"") ."", "WA_IGNORE");
$InsertQuery->bindColumn("image_id", "i", "".$_SESSION['WADA_Insert_tbl_images'] ."", "WA_IGNORE");
$InsertQuery->execute();
}
}
if ($MultipleInsertRedirect) {
if (function_exists("rel2abs")) $MultipleInsertRedirect = rel2abs($MultipleInsertRedirect,dirname(__FILE__));
header("location: " . $MultipleInsertRedirect);
}
}
?>

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

Content

rating

Layout

rating

Ease of use

rating

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...