FIRST, I GOT TWO FIELD IN MySQL DATABASE field, COIN and field COIN_CHARGE here is the screen shot POPUP Screnshot, i want the system to check if a user click YES, that is attempting to summit and proceed, let the system check through his database Database screen shot and start this Argument, (if field -coin- is less than field -coin_charge-) is should popup a window saying, Insufficient Fund to proceed Top Up your account else, if the coin field is greater than the coin_charge field let the system subtract coin_charge from coin, which is, if (coin = 100) and (coin_charge =50) coin will become 50
----------------- POP UP MESSAGE ------------------------------
<!-- Trigger the modal with a button -->
<button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#myModal">Report Assignment</button>
<!-- Modal -->
<div id="myModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Report Assignment Now!</h4>
</div>
<div class="modal-body">
<p>You Will Be Charge From Your Portal Account, Do You Wish To Continuo?</p>
</div>
<div class="modal-footer">
<a class="btn btn-primary" data-toggle="modal" onClick="$('#createFormId').modal('show')" >YES</a>
<button type="button" class="btn btn-default" data-dismiss="modal">NO</button>
</div>
</div>
</div>
</div>
---------------------------COMPUTING CODE---------------------------
<?php
$message_query = mysql_query("select * from student ")or die(mysql_error());
?>
<?php
while ($row = mysql_fetch_assoc($results)) {
echo $row['coin'] = $row['coin'] - $row['coin_charge'];
}
?>