How to create URL in plugin? (1 post)

  1. jaypabs
    Posted 3 years ago #

    I am new to wordpress plugin and I have started a few lines of code. What I am wondering now is on how to create a URL that will listen for incoming data using GET method.

    I would like to have a URL like:


    This process.php file contains a php code that saves a value from the parameter.

    Example I have a javascript on the same website that call this URL like:


    Inside process.php is a simple script that will save the value to the table like:

    $value = $_GET["value"];
    $country = $_GET["country"];
    $wpdb->insert( 'wp_mytable', array( 'value' => $value, 'country' => $country ), array( '%s', '%s' ) );

Topic Closed

This topic has been closed to new replies.

About this Topic