WordPress plugin – multiple php files

Question

I need help with my first WP plugin. I have php/mysql app splited in 10 php files (mostly some forms) and I have a problem with association between in formscript.php and that service script (service.php). I certainly need result from service.php in WP (plugin) interface.

Simplified scripts:

myfirst.php
<?php /* 
Plugin Name: myfirst
...*/
function myfirst_admin() {
    include('formcript.php');}

function myfirst_admin_actions() {
    add_options_page("myfirst", "myfirst", 1, "myfirst", "myfirst_admin");
} 
add_action('admin_menu', 'myfirst_admin_actions');?>

formscript.php:
echo '<form method="post" action="service.php">
<input type="text" name="something" />
<input type="submit" value="send" />
</form>';

service.php:
<?php echo $_POST["neco"];?>

Any suggestions?

0
Michael 8 months 0 Answers 112 views 0

Leave an answer