Hi,
Developing my first plugin, I have run into some problems. My plugin is displayed on a standard page. On this page, I have an index with links for every letter in the alphabet. When the user clicks a link, I want to display all records from the database that has a name that starts with the selected letter. However, I can't catch the GET vars. My links look like this:
<a href="?action=index<r=A">A</a>
The function where I handle the links looks like this:
if ( isset( $_REQUEST['action'] ) ) {
switch( $_REQUEST['action'] ) {
case 'search' :
$output .= do_search();
break;
case 'index' :
$output .= show_index();
break;
}
}
The search action works fine when I submit the search form (action=post), but the show_index() function does not get called when i click on the link above.
I'm fairly new with both php and wordpress, so I'm probably just doing something wrong, but I can't figure out what.
Any suggestions will be appreceated.
/Rasmus