I am not sure why this is not working, Its setting the flags perfectly but will not update events...
if(isset($_REQUEST['del'])){
if($_REQUEST['del'] == 1){
$asset_id = $_REQUEST['assetID'];
$sql = "UPDATE assets, events SET assets.del_flag=1 , events.del_flag=1
WHERE assets.id='$asset_id' AND events.asset_id='$asset_id'" or die(mysqli_error($mysqli));
if ( $mysqli->query($sql) ) {
$addevent1 = "INSERT INTO events(title, desc, event_date, cust_id, asset_id) VALUES ('$asset_tag', 'Flagged an asset for Deletion', '$adddate', '$custID', '$id')" or die(mysqli_error($mysqli));
$mysqli->query($addevent1);
$result = '<div class="alert alert-danger">Item Deleted</div>';
}
}
}
do you see anything wrong?