testapi.js
/*
Function deleting an user library by calling the API , if done successfully it will update the webpage
 */
Function deleting an user library by calling the API , if done successfully it will update the webpage
Function deleting an user library by calling the API if done successfully it will update the webpage
function delete_user() {
    let username = $("#select_users").val();
    $.ajax({
        method: 'DELETE',
        data: {
            username: username,
        },
        url:'./library.php',
        success: function (response) {
            user_list();
            hide_user();
        },
        error: function(xhr, status, error) {
            alert(error);
        }
    })
}
function delete_user ( ) { let username = $ ( "#select_users" ) . val ( ) ; $ . ajax ( { method : 'DELETE' , data : { username : username , } , url : './library.php' , success : function ( response ) { user_list ( ) ; hide_user ( ) ; } , error : function ( xhr , status , error ) { alert ( error ) ; } } ) }
Function deleting an user library by calling the API , if done successfully it will update the webpage
Function deleting an user library by calling the API if done successfully it will update the webpage