我有一个复杂的页面,可能包含十几个POST元素和一个文件上传(非Ajax ATM). 我有一个带有说明的表格,如果它导致akismet将其查找为垃圾邮件,我希望通知用户,然后在其浏览器上回击以重试,或者保留呼叫POST数据,以便用户可以填写reCaptcha来绕过垃圾邮件标记.
I have a complex page with maybe a dozen POST element and a file upload (non ajax ATM). I have a form with a description, if it causes akismet to find it as spam i would like the user to be informed and either hit back on their browser to try again or to hold call POST data so the user can fill in a reCaptcha to bypass the spam marking.
我如何保存POST数据?我不知道如何将用户重定向到此验证码页面并保留所有发布数据.如果它是通用的并且我不需要复制帖子并用手获取数据,那将是更好的选择.
How do i hold the POST data? i have no idea how to redirect the user to this captcha page and to keep all the post data. It would be preferable if it was generic and i didnt need to copy the post and get data by hand.
推荐答案一种解决方案是使用所有接收到的数据创建隐藏的表单字段.一般而言,这很容易做到,只需遍历所有$ _POST元素并为每个元素创建一个新的隐藏字段. 显然,您必须创建一个有效的表单. 加载此新页面后,您应该重定向到所需的位置.
One solution could be to create hidden form fields with all received data. This is easy to do it generically, just iterate through all $_POST elements and create a new hidden field for each one. Obviously you must create a valid form. Once this new page is loaded you should redirect to desired location.
更多推荐
我可以在ASP.NET中“保存" POST数据,以便可以通过Captcha进行验证吗?
发布评论