I have issue with script js inside php so i want ipnut get the somme of the value return by function js in dispaly in input with condition in php inside the input in below my script php:
function getSum(){               
    let NotePresence= document.getElementById("NotePresence").value;
    let NoteValidation= document.getElementById("NoteValidation").value;
    let NoteEvaluation= document.getElementById("NoteEvaluation").value;
    let t=NotePresence+NoteValidation+NoteEvaluation;
    return t;
}
calling in php:
<div class="form-group" style="display: flex">
    <input readonly="" style='width: auto' type="text" 
            name="NoteFinale" id="NoteFinale" 
            class="form-control" maxlength="2" 
            value="<?php echo '<script type="text/javascript">getSum();</script>';?>
            size="4" />
    <label for=""> /80</label>
</div>
Thanks in advance
 
     
    