I have a table:
Theinformationshownissearchedinthebank,andonthesideofthecolumn(inthisexample)-Salary-willhaveacolumncalledLock/Unlock-whereIcanlockthatinformationinthebankfrom0to1)andsobeforethename-exampleAshtonCoxwillhaveagreeniconthatmeansunlockedandaredifitislocked.
Whencheckingthecheckbox,IwantedtoseeanalertAreyousureyouwanttoblock?andthesamethingtounlock"Are you sure What do you want to unlock? "
How I'm doing:
<tbody>
<?php
while($linhaAssociativa = mysqli_fetch_assoc($query))
{ ?>
<tr>
<td><?php echo $linhaAssociativa["Name"]; ?></td>
<td><?php echo $linhaAssociativa["Position"]?></td>
<td><?php echo $linhaAssociativa["Office"]?></td>
<td><?php echo $linhaAssociativa["Age"]?></td>
<td><?php echo $linhaAssociativa["Start date"]?></td>
<td><?php echo $linhaAssociativa["Salary"]?></td>
<td><input type="checkbox" name="muda" id="muda" /></td>
</tr>
<?php
} ?>
</tbody>
I'm not able to do the javascript / jquery code so that: Checking the checkbox of a row of the table shows if it is not blocked: "Are you sure you want to block?" or show if it's locked: "Are you sure you want to unlock?" - in an alert and change the value from 0 to 1 or 1 to 0