在 wordpress 的自定义管理页面上提交表单 [英] Submitting a form on a custom admin page in wordpress

查看:46
本文介绍了在 wordpress 的自定义管理页面上提交表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 wordpress 管理中创建了一个自定义页面,它有一个简单的文件上传字段和一个提交按钮.我需要弄清楚如何将页面提交到可以处理但在网络上找不到任何内容的地方.有谁知道表单上的操作"需要什么才能让它转到一个函数或另一个我可以处理文件的页面?

I created a custom page in the wordpress admin which has a simple file upload field and a submit button. I need to figure out how to submit the page to somewhere it can be processed but can't find anything on the web. Does anyone know what the 'action' needs to be on the form to get it to go to a function or another page where i can process the file?

推荐答案

感谢 Hunter 先生.无法将正确答案归功于您.

Thanks Mr. Hunter. Couldn't credit you for the right answer.

将表单包装在 if(isset($_POST['submit'])) 中,然后调用我的函数.

Wrapped the form in a if(isset($_POST['submit'])) and then called my functions.

这篇关于在 wordpress 的自定义管理页面上提交表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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