Insert with Bootstrap Switch [duplicate]

0

I'm having a question in the following scenario, I'm trying to insert the status using the plugin Plugin Link Below is a summary of the code that 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 this: How do I do that so that if in the visual is off enter NAO; and if you're on SIM?

    
asked by anonymous 20.12.2014 / 01:43

1 answer

0

I solved the problem just to get the post and define it:

$destacar = (isset($_POST['destacar'])) ? 1 : 0;
$status = (isset($_POST['status'])) ? 1 : 0;
    
20.12.2014 / 02:36