php - 如何发布以下开关按钮的值
问题描述
完整代码在这里: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>
解决方案
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>
推荐阅读
- python - .pack() 和 .grid() 的替代品
- json - 替换多个 JSON 文件中对象属性的值
- java - 调用@OAuthSecurity 资源时移动应用程序继续加载
- lotus-notes - Lotusscript:检索电子邮件正文中的图像
- python - Thinc 中 PyTorchLSTM 的问题
- r - 解释管道
- c++ - 为什么我们需要 [dcl.init]/(6.2) 中下面突出显示的句子?
- android - React Native打开失败:将图像保存到相机胶卷后ENOENT(没有这样的文件或目录)
- webpack - 更改 webpack 5 生成的字体
- apache-kafka-connect - Kafka Connect MaskField SMT 在墓碑上失败