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?

Fixed it, I forgot to encapsulate the desc in desc such an idiot sometimes...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.