close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Problem creating Insert Record Page

Thread began 9/02/2014 1:45 pm by Andrew | Last modified 9/04/2014 10:05 am by Jason Byrnes | 653 views | 8 replies |

Andrew

Problem creating Insert Record Page

I have successfully built and run a mySQLi Insert Record page using WebAssist MySQLI Server Behaviors on a Test Page. So I know that it works!

Am now struggling to repeat it (different page and different databases).
Have built Recordsets and created a Form with all its text fields and menus.
Using MySQLi Insert Record have created dynamic links between each column value and the appropriate form element (listed under Bindings).

On OK - php is added to the top of the page ...
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$InsertQuery = new WA_MySQLi_Query($connsheffieldarchives);
$InsertQuery->Action = "insert";
$InsertQuery->Table = "items";
$InsertQuery->bindColumn("itemNo", "i", "".((isset($_POST["itemNo"]))?$_POST["itemNo"]:"") ."", "WA_DEFAULT");
$InsertQuery->bindColumn("itemTitle", "s", "".((isset($_POST["itemName"]))?$_POST["itemName"]:"") ."", "WA_DEFAULT");

....................

$InsertQuery->saveInSession("andrew_test");
$InsertQuery->execute();
$InsertGoTo = "../lists/full_listing.php";
if (function_exists("rel2abs")) $InsertGoTo = $InsertGoTo?rel2abs($InsertGoTo,dirname(__FILE__)):"";
$InsertQuery->redirect($InsertGoTo);
}
?>

Within the code for the Form, nothing is added.

With nothing in the form - nothing happens to the form menus.

The successful Test Page Form had code inserted into it and the menus worked.

Non working page - "Server Behaviors" lists Insert Record and Recordsets.

The "Server Behaviors" for the successful Page also shows MySQLi Dynamic List/Menu for the two tables that are providing data which is being inserted into the third. There are no values entered.

I am now going round in circles recreating the page.

Where am I going wrong? Help would be much appreciated.

Thanks in anticipation.

Sign in to reply to this post

Jason ByrnesWebAssist

please send a copy of the page so I can see the code in context

Sign in to reply to this post

Andrew

Problem creating Insert Record Page

Copy of page attached

Sign in to reply to this post

Jason ByrnesWebAssist

I Dont see an obvious probelm in the code, I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

Andrew

See Below

Sign in to reply to this post

Jason ByrnesWebAssist

Send an export of the data please, I will to recreate on my end.

Sign in to reply to this post

Andrew

See below

Sign in to reply to this post

Andrew

Hi Jason

I've solved it.

See below

Sign in to reply to this post

Jason ByrnesWebAssist

ok, glad to hear you have it working.

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

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