close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Problem creating Insert Record Page

Thread began 9/02/2014 10:45 am by Andrew | Last modified 9/04/2014 7:05 am by Andrew | 1951 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.

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