close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Difficulty loading existing data into an Edit Form.

Thread began 9/11/2014 8:05 am by Andrew | Last modified 4/02/2015 2:55 pm by Andrew | 1671 views | 14 replies

Andrew

Hi Jason

Thank you - that worked.

Data is now loaded and can be amended.

Submitting gets
Notice: Undefined variable: rsItems in C:\wamp_php5_5\www\sheffieldarchives\admin\edit.php on line 9
Fatal error: Call to a member function getColumnVal() on a non-object in C:\wamp_php5_5\www\sheffieldarchives\admin\edit.php on line 9

The relevant piece of code is:
$UpdateQuery = new WA_MySQLi_Query($connsheffieldarchives);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "items";
$UpdateQuery->bindColumn("itemID", "s", "".($rsItems->getColumnVal("itemID")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("itemNo", "i", "".((isset($_POST["itemNo"]))?$_POST["itemNo"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("itemTitle", "s", "".((isset($_POST["itemName"]))?$_POST["itemName"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("itemDescription", "s", "".((isset($_POST["itemDescription"]))?$_POST["itemDescription"]:"") ."", "WA_DEFAULT");
.......

and rsItems is:
<?php
$rsItems = new WA_MySQLi_RS("rsItems",$connsheffieldarchives,1);
$rsItems->setQuery("SELECT * FROM items WHERE itemID = ?");
$rsItems->bindParam("i", "".(isset($_GET['itemID'])?$_GET['itemID']:"") ."", "-1"); //colname
$rsItems->execute();
?>

I used to do this with a DW Wizard - that's why I'm struggling (I don't understand php).

Thanks in anticipation.

Andrew

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