I'm a new comer to wordpress connect development. I've developed a search form however have no clue where you can handle and print the posted form data. it's a wedget based connect and also the wordpress plugin form section code is here now:

   function widget( $args, $instance ) {
    extract( $args );
        $title = apply_filters( 'widget_title', $instance['title'] );
                $message = apply_filters( 'widget_content', $instance['content'] );
        echo $before_widget;
        //if ( $title )
        //  echo $before_title . $title . $after_title;
        echo '<div class="shk_location_form_holder">
                    <span class="shk_loc_title">'.$title.'
                    <form mthod="post">
                    <input type="text" name="shk_inp_search_locations" id="shk_inp_search_locations" /><br>
                    <div style="height:5px"></div>
                    <input type="submit" Value="Search Locations" />
                    </form></div>';
        echo $after_widget;
                if(isset($_REQUEST['shk_inp_search_locations'])){
                    add_filter('the_content','handle_content');
                }
    }

In Wordpress plug ins you typically come with an empty action="" inside a form, and take care of it within the same function (incidentally, as wordpress procedural code becomes very untidy, it's easier to write plug ins using OOP), because, anyway plug ins are loaded before any submissions are outputted in Wordpress (because of this , why writing ajax plug ins is really easy in wordpress). So that you can have all the feaures structured such as this:

function draw_form() {
    handle_submit();
?>
<div class="shk_location_form_holder">
    <span class="shk_loc_title"><?php echo $title; ?></span>
    <form mthod="post" action="">
        <input type="text" name="shk_inp_search_locations" id="shk_inp_search_locations" /><br>
        <div style="height:5px"></div>
        <input type="submit" Value="Search Locations" />
    </form>
</div>
<?
}

function handle_submit() {
    if(isset($_POST['shk_inp_search_locations']) && $_POST['shk_inp_search_locations'] == 'test') {
        echo 'you may want to end your program here, especially if it\'s ajax!';
        exit;
    }
}