How to call WordPress PHP server (A Plugin made by myself) on submit of HTML?

  • Unknown's avatar

    I have created a custom plugin in php where I included my HTML page and I want to invoke a function in this page on submit of form

    This is my form

    ############################################################
    <?php get_header(); ?>

    First Name

    Last Name

    Birth Date

    Employee ID

    Company EIN

    Upload supporting documents

    <!– /#content –>

    <?php get_footer(); ?>
    ############################################################
    This is my server.php (Plugin)

    <?php
    /*Plugin Name:Sample server
    Description:Trying Sample server.php
    version: 1.0
    Author :Jegan
    */
    function html_form_code()
    {
    include(‘serverform.html’);
    }
    function form_print()
    {
    echo “Server is invoked”;
    }
    add_action( ‘init’, ‘form_print’ );
    add_shortcode(‘sampleServer’,’custom_form_shortcode’);

  • Unknown's avatar

    Hello @jegans96fbe957ed,

    I think you posted the question in the wrong forum. WordPress development support forum is located here.

    https://wordpress.org/support/forum/wp-advanced/

    This forum is for support discussion regarding WordPress.com blogs.

    Regards,
    Melbin Mathew

  • The topic ‘How to call WordPress PHP server (A Plugin made by myself) on submit of HTML?’ is closed to new replies.