WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this basic admin page


<?php include('ui.php'); ?>


function gui()
function add_page()
    $themename = 'Cesaro';
    $page_function = 'gui';
    add_menu_page( $themename." Options", $themename, 'edit_themes', $page_function, 'gui' );
add_action( 'admin_menu', 'add_page' );


<form name="input" action="post_options_from_form.php" method="post">
        <label>Firstname</label><input type="text" class="x-input"/>
        <label>Lastname</label><input type="text" class="x-input"/>
        <label>City</label><input type="text" class="x-input"/>
    <input type="submit" value="Update Options" class="x-button"/>

When i click update options,i get the error

The requested URL /wp-admin/post_options_from_form.php was not found on this server.

How do i make sure that post values end up my php i specified in the post action?.My post php file is post_options_from_form.php

share|improve this question

I solved it this way

<form name="input" action="<?php echo get_bloginfo( 'template_directory' ).'/'.'post_options_from_form.php'; ?>" method="post">

although i wanted post_options_from_form.php to be an admin page.


This finally worked as i was able to post to the admin page i created

<form name="input" action="admin.php?page=admin_page" method="post">

On the function,

function admin_page()
share|improve this answer
Just using <form name="input" method="post"> is enough. – RRikesh Jul 26 '12 at 9:31
No its not enough. – Gandalf Jul 26 '12 at 14:27

Your Answer


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.