Dynamic redirect url on update based on column value in table
We have been redirecting according to a column value in our user table. Now I am upgrading my pages to mySLQi and I obviously do not have something right.
I am attaching my page.
The recordset is on line #16 and also pasted here:
<?php
$SecurityAssisttbldirectorylistings = new WA_MySQLi_RS("SecurityAssisttbldirectorylistings",$HotNetwork_i,1);
$SecurityAssisttbldirectorylistings->setQuery("SELECT * FROM tbl_directorylistings WHERE id = ?");
$SecurityAssisttbldirectorylistings->bindParam("i", "".($_SESSION['id']) ."", "-1"); //colname
$SecurityAssisttbldirectorylistings->execute();
?>
The update is on line#258 and here
<?php
if (isset($_POST["Update"]) || isset($_POST["Update_x"]) && ($_SESSION["SecurityAssist_id"] == 9290)) {
$UpdateQuery = new WA_MySQLi_Query($HotNetwork_i);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "horses";
$UpdateQuery->bindColumn("admin_notes", "s", "".((isset($_POST["admin_notes"]))?$_POST["admin_notes"]:"") ."", "WA_BLANK");
$UpdateQuery->addFilter("horseid", "=", "i", "".((isset($_POST["WADAUpdateRecordID"]))?$_POST["WADAUpdateRecordID"]:"") ."");
$UpdateQuery->execute();
$UpdateGoTo = "http://". ($SecurityAssisttbldirectorylistings->getColumnVal("toptable")) . "/hotpage/horse-profile.php?horseid=" ."";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
$UpdateQuery->redirect($UpdateGoTo);
}
?>