1. Using switches for multiple url variables
<p>ok say i have these pages,</p>

<ul>
<li>/admin/admin.php</li>
<li>/admin/blogger.php</li>
</ul>

<p>inside my main index.php, i have a switch array that runs an 'if exists $page' function, which works fine. all my pages are called from site.com/index.php?page=about, site.com/index.php?page=misc, etc etc.</p>

<p>inside my admin.php page is a php tabbed navigation that uses 4 tabs for my admin sections (blogger/image manager/file manager/quotes manager). it uses a switch of tabfunctions for the 4 pages.</p>

<p>the blogger.php is where i have my switch in question.</p>

<p>now for my question:
instead of having multiple pages for the blog system, "delete.php, add.php, edit.php, etc" and using like 'to delete click (delete.php?id=1) here', i wanted to try and run it all from the blogger page. for example, "site.com/admin.php?page=blogger&amp;act=dp/ep/ap" would get whichever $act is being passed and then using a switch to complete the action.</p>

<p>my PAGE switch works fine, but when i try to call more switches, it doesn't work. I tried using this as my code</p>

<pre><code>if(isset($_SESSION['id'])) {  
  $act = $_GET['act'];  
  switch ($act) {  
    case 'ap':  
      addPost();  
      break;  
    case 'ep':  
      editPost();  
      break;  
    case 'dp':  
      delPost();  
      break;  
    default:  
      ~table setup  
      ~$query, $result  
      ~if / while loops
      ~echo $row-&gt;article_id/title/author/date  
      echo "&lt;a href=\"index.php?page=admin&amp;amp;tabindex=0&amp;amp;act=ep&amp;amp;id={$row-&gt;article_id}\"&gt;Edit&lt;/a&gt;"  
      ...  
      ...  
      ...  
</code></pre>

<p>here is the issue i'm having. the page is correct, the tabindex is correct, then it stops working. i just get a blank page, not the edit page like i should. my editPost function is correct, as i've tested it from the editpost.php?id=1 way, which i am trying to avoid. and yes, my functions are included from here as well. </p>

<p>is the url not being passed right? or is my act switch not set up correctly. maybe setting an isset($_GET['act']) before the switch? i'm at a loss.</p>

<p>thank you.</p>
