I'm using On/off radio button within my wordpress to cover publish from the particular category and I have done well to date,

I am talking about after i set the button to 'On', posts from category whose id is 495 vanishes so when i turn if from the posts returns,

this is actually the problem i'm facing,

I set the button to 'Off' therefore the posts from category id 495 vanishes i quickly click 'older posts' link and would go to previous pages however after i chose 'On' i instantly leaped to page # 1 :S

why happening ? Why shall we be held instantly jumping to first page when click 'On' ? :S

this is actually the code,

This is actually the header code,

<?php
session_start();
if (isset($_POST['r1'])){
    $_SESSION['r1']=$_POST['r1'];
    }
?>

they are my two radio buttons,

<li><input type="radio" name="r1" value="o" onClick="submit();" <?php echo ($_SESSION['r1'] == "o") ? 'checked="checked"' : ''; ?> />On</li>
<li><input type="radio" name="r1" value="p" onClick="submit();" <?php echo ($_SESSION['r1'] == "p") ? 'checked="checked"' : ''; ?> />Off</li>

which is the code in index.php,

<?php 
    if ($_POST['r1']=='o') // Family Filter !!! If 'ON'
    query_posts('cat=-495'); // Remove Post from Category whose Id is 495
    else {echo "";} // When off is selected
?>

can there be a problem using the code inside index.php ??

Once form is posted parameter page sheds. It seems in query string after hitting "Older posts". Automatically it equsls to at least one.

You've pass it to query_post function and employ something similar to this

query_posts('cat=-495&page='.$page);

where

$page=(int)$_GET['page']; // I don't remeber exactly parameter name.