<?php
$log_sql=mysqli_query($con,"INSERT INTO logs(user_id, activity,branch_id) VALUES 
('$id_user','$activity','$branch')");

if ($log_sql) {
    //echo "New record created successfully";
} else {
    echo "Error: Failed to add log <br>" . mysqli_error($con);
}

mysqli_close($con);
?>