0
I am having a doubt in the following scenario, I am trying to insert the status using the plugin Plugin Link Here is a summary of the code I’m using
$status = $_POST['status'];
$stmt->bindParam("status", $status);
$stmt->execute();
<input type="checkbox" id="destacar" name="destacar" value="sim" checked>
<script type="text/javascript"> $("[destacar='sim']").bootstrapSwitch(); </script>
My question is the following: How do I stop so that if the visual is off insert NO; and if I am on insert YES ?
Off-topic: Your selector
$("[destacar='sim']")
it seems wrong, I believe that the broker would be$("#destacar:checked")
,destacar='sim'
would process elements like<div destacar="sim"></div>
and not the attributevalue
.– Guilherme Nascimento