deleting a row
Hi Ray
On the site you helped me with the other day (the content history) just wondering how I get the delete button on the attached to work to delete the selected item from the drop down.
Cheers
Jamie
Hi Ray
On the site you helped me with the other day (the content history) just wondering how I get the delete button on the attached to work to delete the selected item from the drop down.
Cheers
Jamie
Just use the delete server behavior triggered on the delete button press with the HistoryID from the select list as the deleted item index.
isnt that what I have done here?
<?php
if (isset($_POST["Delete"]) || isset($_POST["Delete_x"])) {
$DeleteQuery = new WA_MySQLi_Query($DBConnection);
$DeleteQuery->Action = "delete";
$DeleteQuery->Table = "content_history";
$DeleteQuery->addFilter("HistoryID", "=", "i", "".($_GET['HistoryID']) ."");
$DeleteQuery->execute();
$DeleteGoTo = "";
if (function_exists("rel2abs")) $DeleteGoTo = $DeleteGoTo?rel2abs($DeleteGoTo,dirname(__FILE__)):"";
$DeleteQuery->redirect($DeleteGoTo);
}
?>
$_GET['HistoryID'] should be: $_POST['HistoryID']
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.