I am having challenges to hide specific buttons when a record in MyDql Db is set to 'missed'. Please help, here is my code:
Database Connexion
$sql = "SELECT * FROM appointment";
$req = $bdd->prepare($sql);
$req->execute();
$events = $req->fetchAll();
HTML
Calendar API Downloaded from http://jamelbaz.com/tutos/integration-de-fullcalendar2-php-mysql
<div id="calendar" class="col-centered"> </div>
<input type="text" name="title" class="form-control" id="title" placeholder="Name" >
<input type="text" name="surname" class="form-control" id="surname" placeholder="Surname">
<input type="submit" class="" id="Save" name="1" value="Save changes">
<input type="submit" id="try1" class="button alt" name="2" value="Arrived">
<input type="submit" id="try2" class="button alt" name="3" value="Did not arrived"> //once clicked hide Arrived button
<input type="submit" id="try3 class="button alt" name="3" value="Send email"> //show only if record is set to missed
Backend
eventRender: function(event, element) {
element.bind('click', function() {
$('#ModalEdit #name').val(event.name);
$('#ModalEdit #surname.val(event.surname);
},
events: [
<?php
foreach($events as $event):
?>
title: '<?php echo $event['name'] ?>',
surname: '<?php echo $event['surname']; ?>',
<?php endforeach;?>
]
});