Exemple #1
0
</BODY>
</HTML>

<?php 
    $Redirect = 0;
} else {
    if (isset($_REQUEST['Update'])) {
        pg_exec($db, 'BEGIN');
        $Error = '';
        $ElementID = pg_escape_string($_REQUEST['Update']);
        $WatchListElement = new WatchListElement($db);
        if ($Debug) {
            echo "userid = '{$User->id}' and ElementID = '{$ElementID}'<br>";
        }
        if ($WatchListElement->DeleteElementFromWatchLists($User->id, $ElementID) == -1) {
            $Error = 'removing element failed : Please try again, and if the problem persists, please contact the webmaster: ' . pg_last_error();
        }
        if ($Debug) {
            echo "Error is '{$Error}'<br>";
            if (isset($_REQUEST['wlid'])) {
                echo 'yes, it is set<br>';
            } else {
                echo 'no, there is nothing set!<br>';
                phpinfo();
            }
        }
        if ($Error == '' && isset($_REQUEST['wlid'])) {
            if ($Debug) {
                echo "userid = {$User->id} and ElementID = {$ElementID} <br>";
            }