I have a problem with this code and i really can't understand what is it.. i have unique ID for every ticket and it works good but i have made a button to open a modal (#myModal)
and from there to send the ticket to some username but the problem is no matter what ticket i choose to send just the first ticket code is shown also when i try to remove any ticket i can't, its just possible to remove the first ticket.
<tr style="background-color: lavender;">
<th>
<button type="submit" class="btn btn-primary btn-xs" name="share" value="<?= $ticket_id ?>" id="shareBtn" title="Share ticket" onclick="change()">Share</button>
<button type="button" class="btn btn-danger btn-xs" data-toggle="modal" value="<?= $ticket_id ?>" data-target="#myModal" onclick="change()">Ticket ID: <?= $ticket_id ?></button>
<div class="modal fade" id="myModal" role="dialog">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Send Ticket (<?= $ticket_id ?>)</h4>
</div>
<div class="modal-body">
<p><input type="text" class="form-control" id="username" placeholder="Enter Username"/></p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success btn-block" data-dismiss="modal">Send</button>
</div>
</div>
</div>
</div>
</th>
<th>
<a type="submit" class="close" data-dismiss="panel" aria-label="close" id="hide" value="<?= $ticket_id ?>" title="Remove ticket" name="closeTicket" onclick="change()">×</a>
</th>
</tr>