条款和条件表格,1复选框重定向到另一页 [英] Terms and Conditions Form, 1 Checkbox redirect to another page

查看:72
本文介绍了条款和条件表格,1复选框重定向到另一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好我有一个基本表单,它上面有一个带有条款和条件的复选框,用户必须选中复选框说我同意,我遇到的问题是页面正在回显正确的信息但是如果用户选中复选框,则不会重定向用户。


Php代码位于表单页面中的include语句中,该语句通过css等布局。

我的代码是

Hi I have a basic form, all it has on it is a checkbox with terms and conditions, the user has to check the box to say I agree, the problem I am having is the page is echoing the correct information out but is not redirecting the user if they check the box.

The Php code is in include statement in the form page which is layed out via css etc etc.

The code I have is

展开 | 选择 | Wrap | 行号

推荐答案

  1. 确保你的表单设置为使用HTTP POST提交,而不是GET。 (method =" post")
  2. 确保您的复选框命名为同意 (name =" agree")并且有一些非空值(value =" AGREED")
  3. 在后端代码中检查值是否为空。


展开 | 选择 | Wrap | 行号


感谢您的回复,但我遗漏了一些东西,你给我的是半工作i9n那个它会重定向到所需的页面,但如果没有选中复选框,它也会重定向,我错过了什么?

Thanks for the reply but I am missing something, what you have given me is half working i9n that it redirects to the page required but it also redirects if checkbox not ticked, what have I missed?

< span class =codeLinkonclick =Blur(this,this.parentN ode.parentNode,getChildren(this),true);>展开 | 选择 | Wrap | 行号


上面发布的代码工作正常。也许代码的其他部分干扰了重定向。


这是我测试的:

search.php
Code you have posted above works fine. Maybe some other part of the code is interfering with the redirection.

Here''s what I tested:
search.php
展开 | 选择 | Wrap | 行号


这篇关于条款和条件表格,1复选框重定向到另一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆