How to get first page to equal 1 everytime
<p>Below I have a line of code where it states which Page a user is currently on out of the number of Total Pages. </p>

<pre><code>&lt;h1&gt;CREATING QUESTIONS AND ANSWERS: SESSION (AAA) &lt;?php echo $sessionMinus ?&gt; OF &lt;?php echo $_SESSION['initial_count'] ?&gt;&lt;/h1&gt;
</code></pre>

<p>So for example the line could read this:</p>

<pre><code>CREATING QUESTIONS AND ANSWERS: SESSION (AAA) 3 OF 3
</code></pre>

<p>Now the problem I have is that if the user is on the first page, it doesn't display the number 1. So instead of stating 1 OF 3 or 1 OF 5, it is stating 2 OF 3 or 2 OF 5.</p>

<p>So my question is that how can I get the first page to equal 1 OF ... when user accesses the first session (first page)? </p>

<p>Below is the current code:</p>

<pre><code>if(isset($_POST['sessionNum'])){
            //Declare my counter for the first time

            $_SESSION['initial_count'] = $_POST['sessionNum'];
            $_SESSION['sessionNum'] = $_POST['sessionNum'];
            $_SESSION['sessionCount'] = 0;

    }

else if ($_SESSION['sessionCount'] &lt; $_SESSION['sessionNum']) {
    $_SESSION['sessionCount']++;
}


$sessionMinus =  $_SESSION['sessionCount'];
</code></pre>

<p><code>$_SESSION['sessionNum']</code> is the total number of Sessions. So if it is 3 OF 5, then <code>$_SESSION['sessionNum']</code> is 5.</p>
