transferring a variable through different web pages in wordpress

Currently I’m building a plug-in for wordpress, where I have a couple of webpages with tables, filled with data from a database. Right now I’m working on the part where I click on a number (MemberID) which should redirect to a page, having all the information from another table regarding this number. I’ve tried transfering the data through the URL, with both

    ?MemberID=".$item->MemberID." 

and

Read More
    /MemberID="$item->MemberID."

, but everytime I try to alter the URL, the webpages suddenly can’t seem to find itself anymore. I’m sure it has to do whith this part of the code:

    add_submenu_page( null    , 'Manage memberDetails'  , 'memberDetails'   , 'manage_options', 'memberDetails'       , 'memberDetails_list'   );

where the fifth value sets the URL for this page to be

    http://localhost/wordpress/wp-admin/admin.php?page=memberDetails

So whenever I try to add something behind that URL, it doesn’t acknowledge the existance of said page anymore, resulting in a redirection error.

Is there a way to transfer the variable without using the URL, or is there a way to give more of a dynamic to the URL?

Related posts

Leave a Reply

2 comments

  1. As someone pointed my fairly basic mistake out this is what went wrong:

    The URL is

        http://localhost/wordpress/wp-admin/admin.php?page=memberDetails
    

    where I tried to turn it into

        http://localhost/wordpress/wp-admin/admin.php?page=memberDetails/memberID=
    

    which creates a whole new webpage and is therefor impossible in this case. I need to transfer the variable behind the memberID=, not refer to a whole new webpage. The other thing I tried to do was

        http://localhost/wordpress/wp-admin/admin.php?page=memberDetails?memberID=
    

    which is impossible, because the second ? in the URL needed to be replaced with a &
    From there on, it was pretty easy to use $_GET to retrieve the variable from the URL and use it.

    So for extra clarity, this is how the URL is supposed to look

        http://localhost/wordpress/wp-admin/admin.php?page=memberDetails&memberID=