📜  切换开关 php 代码示例

📅  最后修改于: 2022-03-11 14:53:58.835000             🧑  作者: Mango

代码示例1
//html
Enable Notifications
                                  
//js $('#setQuickVar1').on('click', function() { var checkStatus = this.checked ? 'ON' : 'OFF'; $.post("quickRightSidebarDBUpdate.php", {"quickVar1a": checkStatus}, function(data) { $('#resultQuickVar1').html(data); }); }); //php if (isset($_POST['quickVar1a'])){ $quickVar1a = $_POST['quickVar1a']; $query2 = "UPDATE test SET field1 = '".$quickVar1a."' where field1 != '".$quickVar1a."'"; }