MySQLi Update Record not posting updates to table
Hi Ralph,
MySQLi Update Record not posting updates to table. Please help review my code below and advice if anything is wrong and why its not updating my record
<?php
if ($_SERVER["REQUEST_METHOD"] === "POST") {
$UpdateQuery = new WA_MySQLi_Query($DBMS);
$UpdateQuery->Action = "update";
$UpdateQuery->Table = "hostel";
$UpdateQuery->bindColumn("hid", "s", "", "WA_DEFAULT");
$UpdateQuery->bindColumn("Hostel", "s", "".($rsHostelUpd->getColumnVal("Hostel")) ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("Slots", "i", "".($rsHostelUpd->getColumnVal("Slots")) ."", "WA_DEFAULT");
$UpdateQuery->addFilter("hid", "=", "i", "".($_GET['hid']) ."");
$UpdateQuery->execute();
$UpdateGoTo = "host.php?hid=" . $rsHost->getColumnVal("hid") . "";
if (function_exists("rel2abs")) $UpdateGoTo = $UpdateGoTo?rel2abs($UpdateGoTo,dirname(__FILE__)):"";
$UpdateQuery->redirect($UpdateGoTo);
}
?>