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

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 | 1994 views | 14 replies


Difficulty loading existing data into an Edit Form.

Hi Jason

Using the WebAssist Update Record feature, I'm having difficulty loading existing data into an Edit Form.

The link that should load the data is:
<a href="edit.php?itemID=<?php echo($rsItems->getColumnVal("itemID")); ?>">Edit this item</a>

and on the Edit Page, this appears in the browser address with the correct value for the item ID. However no data is loaded into the Edit Form.

The php code at the top of the Edit Page reads ....
$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("publicPrivate", "s", "".((isset($_POST["public"]))?$_POST["public"]:"") ."", "WA_DEFAULT");
$UpdateQuery->addFilter("itemID", "=", "i", "".($_GET['itemID']) ."");
$UpdateGoTo = "admin_menu.php";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
$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

Within the form, the data should appear in form fields that read (typically)
<input type="text" name="itemNo" id="itemNo" /> for text
<select name="decade" id="decade">
while(!$rsDecade->atEnd()) { //dyn select
<option value="<?php echo($rsDecade->getColumnVal("decadeID")); ?>"<?php if (!(strcmp($rsDecade->getColumnVal("decadeID"), ($rsDecade->getColumnVal("decadeID"))))) {echo "selected=\"selected\"";} ?>><?php echo($rsDecade->getColumnVal("decadeName")); ?></option>
} //dyn select
</select> for tables

If it's any help, the relevant pages can be found at
with the link on the bottom of the following page.

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





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