当用户用PHP选中一个复选框时链接到另一个页面


Linking to another page when user checks a checkbox with PHP

我一直在创建一个登录系统,登录/注册是通过一个单一的表单来处理的。用户在未注册时选中复选框,因此我需要使用PHP更改重定向,因为这是我所熟悉的。

用户在尚未注册时勾选复选框

我希望这段代码在你的项目中工作:........

 <input type="checkbox" name="checkbox" value="Overdue.php?i=0" 
name="checket" onClick="if (this.checked) { window.location = this.value; }">

这样做:

<input type="checkbox" name="check" id="check" value="1" onclick="window.location='redirect_pagename.php';">

将您的checkboxnavigate用户的onclick事件添加到另一个页面