• I just need to add a simple user name to the query string in order to track the users who are sending new people to the site.

    Unfortunately, I have no idea how to write a query string.

    If my url is:
    http://mywebsite.com

    And my referrer is:
    referrer

    … what should it look like?

    It doesn’t seem like this is a difficult thing to do, unfortunately everything I’ve looked at looks like Greek to me.
    Thanks

    https://wordpress.org/plugins/s2member/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I don’t see how this is specific to s2Member. Having said that, you’d write a query string like this:
    http://mywebsite.com/?username=vincent5577

    You’d have to have your own script deal with that on the backend by accessing the $_GET[‘username’] variable, such as:

    <?php
    if (!empty($_GET['username'])) {
        // do something with that username
    }
    ?>

    The backend code could be a shortcode, something directly within your functions.php file, or PHP code executed directly within your page or post, although you’ll need a plugin to execute the 3rd version, such as:
    http://wordpress.org/plugins/ezphp/

    Thread Starter glrwork

    (@glrwork)

    ok – thanks

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to write a query string’ is closed to new replies.