SubPaging Php with if else
<p>I'm having a hard time passing values so here is the code:</p>

<p>These is the code to pass the values(<strong>$vview</strong> is the container of the value) to be used when showing the sub page: from <strong>enrollalpha.php</strong></p>

<pre><code>   if(!empty($_POST['Vpanel'])){
             $vview = $_POST['Vpanel'];
             }else {
                 if(!empty($_GET['VPanel'])){                
                 $vview= $_GET['VPanel'];
                }else{
                 $vview= 'VS';
                }
             }
</code></pre>

<p>And this is the codes where <strong>$vview</strong> is to be used</p>

<pre><code>if($vview == 'VS'){
            require_once 'vpanel_student.php';
        }
        else if($vview == 'VA'){
            require_once 'vpanel_adviser.php';
        }
        else if($vview == 'VA'){
            require_once 'vpanel_adviser.php';
        }else{
            require_once 'vpanel_student.php';
        }
</code></pre>

<p>let us assume my subpage now is showing <strong>vpanel_adviser.php</strong> at the said page i have this code:</p>

<pre><code>    else if(empty($_GET['id'])){
               header("location:enrollalpha.php?&amp;VPanel='VA'");

            }
</code></pre>

<p>So at <strong>enrollalpha.php</strong> remember i have this</p>

<pre><code>    if(!empty($_GET['VPanel'])){                 
             $vview= $_GET['VPanel'];
            }else{
             $vview= 'VS';
            }
</code></pre>

<p>my current problem is when <strong>vpanel_adviser.php</strong> returns the user to <strong>enrollalpha.php</strong> it is not showing <strong>vpanel_adviser.php</strong> but shows <strong>vpanel_student.php</strong> Would appreciate any help on this.</p>
