I have a settings page for a plugin which I created using this function:
function vsp_create_menu() {
add_menu_page( 'Visitors Statistics', 'Visitors Statistics', 'manage_options', 'vsp_settings_page', 'vsp_settings_page_function', plugins_url( '/images/icon.png', __FILE__ ) );
}
That created a plugin setting page.
In the settings page I am displaying some data. Instead of displaying all the data at once, I want to paginate my data, using the $_GET global variable. So, in my SQL query, the last part would be soemthing like
LIMIT $_GET['offset'], 10
So that would display 10 posts offset from whatever the GET is.
My question is how do I populate the $_GET. Because I'm not to familiar with WordPress plugin creation, I thought it would be like this...
<form id='vsp_pagination' action='<?php echo $_SERVER['PHP_SELF']; ?>' method='GET'>
But that doesn't work. When the user clicks on the submit button in the form, it take the user to
http://example.com/wp-admin/admin.php?
Basically, can anyone help me with getting some data in the _GET so I can use that data to manipulate my query? Is there a better way to do what I'm trying to do?