full code here : https://codepen.io/asmoun0801/pen/mGegjw
<div class="">
<p>Certifiée :</p>
<!-- Rounded switch -->
<label class="switch">
<input type="checkbox">
<span class="slider round"></span>
</label>
</div>
If I'm getting this right, you should place the <input>
element inside a
<form method="POST" action=""> ... </form>
element in order to be able to POST it to a PHP server. Also you should set the name attribute of the input field.
css : https://codepen.io/asmoun0801/pen/eLJOXg solution html :
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<?php if(isset($_POST['cert'])){
echo $cert[0] ;
}
?>
<form action="action.php" method="post">
<div class="">
<p>Certifiée :</p>
<!-- Rounded switch -->
<label class="switch">
<input type="checkbox" name="cert[]" value="true">
<span class="slider round"></span>
</label>
</div>
</form>
</body>
</html>