Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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:

admin.php?page=plugin/page1.php

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.

share|improve this question
add comment

1 Answer

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

share|improve this answer
    
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 '12 at 10:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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