首页 > 解决方案 > 如何发布以下开关按钮的值

问题描述

完整代码在这里: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>

标签: phphtmlcss

解决方案


css:https ://codepen.io/asmoun0801/pen/eLJOXg 解决方案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>

推荐阅读