迅睿CMS框架是一款PHP8高性能·简单易用的CMS开源开发框架,基于MIT开源许可协议发布,免费且不限制商业使用,是免费开源的产品,以万端互联为设计理念,支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
一个页面两个表单,表单建立出来之后onclick="dr_ajax_submit和<input name="csrf_test_name" type="hidden" value="*****">都一样导致能提交,但是后台接收不到数据,应该怎么办?
插件教程:https://www.xunruicms.com/doc/app-710.html
<form method="post" name="contactus" id="contactus">
<button type="button" onclick="dr_ajax_submit('域名?s=form&c=contactus&m=post', 'myform', '2000', '域名?s=form&c=contactus&m=post')" ">同一个页面上面,两个表单都是用的button。现在这样写都可以提交,但是在后台 name="contactus"这个表单拿不到数据。如果把上面的表单注释了,就可以拿到数据。
<form method="post" name="sgyefrom" id="sgyefrom">
<button type="button" onclick="dr_ajax_submit('域名?s=form&c=sgyefrom&m=post', 'sgyefrom', '2000', '域名?s=form&c=sgyefrom&m=post')" ">
<button type="button" onclick="dr_ajax_submit('域名?s=form&c=contactus&m=post', 'contactus', '2000', '域名?s=form&c=contactus&m=post')" ">
<form method="post" name="contactus" id="contactus">
<button type="button" onclick="dr_ajax_submit('域名?s=form&c=contactus&m=post', 'myform', '2000', '域名?s=form&c=contactus&m=post')" ">同一个页面上面,两个表单都是用的button。现在这样写都可以提交,但是在后台 name="contactus"这个表单拿不到数据。如果把上面的表单注释了,就可以拿到数据。
<form method="post" name="sgyefrom" id="sgyefrom">
<button type="button" onclick="dr_ajax_submit('域名?s=form&c=sgyefrom&m=post', 'sgyefrom', '2000', '域名?s=form&c=sgyefrom&m=post')" ">
<form method="post" name="contactus" id="contactus">
<button type="button" onclick="dr_ajax_submit('域名?s=form&c=contactus&m=post', 'contactus', '2000', '域名?s=form&c=contactus&m=post')" ">