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

Update Working

Thread began 5/20/2016 8:44 am by stevenmcgough | Last modified 5/20/2016 1:23 pm by stevenmcgough | 291 views | 1 replies


Update Working

I have a very simple page as way of a test which is not working with an update. I followed the steps to create this and the resulting code is :

<?php require_once('Connections/PWS_Conn.php'); ?>
<?php require_once('webassist/mysqli/rsobj.php'); ?>
<?php require_once('webassist/mysqli/queryobj.php'); ?>
$RS_PWS = new WA_MySQLi_RS("RS_PWS",$PWS_Conn,1);
$RS_PWS->setQuery("SELECT * FROM pws_clients WHERE ID = ?");
$RS_PWS->bindParam("i", "".(isset($_GET['ID'])?$_GET['ID']:"") ."", "-1"); //colname
$UpdateQuery = new WA_MySQLi_Query($PWS_Conn);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "pws_clients";
$UpdateQuery->bindColumn("Fname", "s", "".($RS_PWS->getColumnVal("Fname")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("Lname", "s", "".($RS_PWS->getColumnVal("Lname")) ."", "WA_DEFAULT");
$UpdateQuery->addFilter("ID", "=", "i", "".($_GET['ID']) ."");
$UpdateGoTo = "updated.php";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
<!doctype html>
<meta charset="utf-8">
<title>Untitled Document</title>
<link href="css/pws.css" rel="stylesheet" type="text/css">


<div class="form-style-8"><img src="assets/emails/pws_logo.png" width="126" height="127" alt=""/><br>
<?php echo($RS_PWS->getColumnVal("Fname")); ?></strong></div>

<div class="form-style-8">
<h2>Register for the VIP EVENT</h2>
<form action="" method="post" name="ClientsReg" id="ClientsReg">
<label for="Fname">First Name:</label>
<input name="Fname" type="text" id="Fname" value="<?php echo($RS_PWS->getColumnVal("Fname")); ?>">
<input type="submit" name="submit" id="submit" value="Submit">


BUT - it redirects to the updated page - but the record has not been updated...Any help would be appreciated

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