This is a simplified version of what I need to do (i.e. I know there are other ways of doing things but I need a solution to this specific problem). I am using wordpress 3.3 from a fresh install.

I have a plugin and I have added it to the admin menu:

add_menu_page('Plugin','Plugin', 'edit_pages', 'plugin/page1.php');

which works fine, I can click on it it takes me to:


plugin/page1.php has a form on it:

<form action="admin.php?page=plugin/page2.php">

When I submit the form however I get a "You do not have sufficient permissions to access this page." page

If I add plugin/page2.php as an menu or submenu item then i can submit to it with no problems. If i set the action of the form to be admin.php?page=plugin/page1.php the form submits fine also.

My question is how do I get this to work? I suspect I have to register some thing somewhere I just have no idea what and searching has yielded nothing.

1 Answer 1


May I suggest you look into the Settings API http://codex.wordpress.org/Settings_API, or will this not suit your needs?

  • Though this is helpful with other things I am doing, in this specific situation it does not help me. With this specific situation I need to specifically POST data from one file to another.
    – laznik
    Jan 9, 2012 at 10:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.