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