how can i run PHP functions with query to database from javascript [duplicate]

How can i run php functions with query to the database from the level of the javascript function?

</script>
function databaseUpdate() {

}

</script>


<?php
function databaseUpdatePHP () {

    $sqlUpdateVocabulary = "UPDATE users SET number='$number+20' WHERE email='" . $_SESSION['username'] . "'";
    if(mysqli_query($conn, $sqlUpdateVocabulary)){
        echo "updated successfully.";
    } else {
        echo "ERROR";
    }

}
?>