Redirect to index.php when other pages have been accessed
<p>i have this php pages</p>

<p>index.php</p>

<pre><code>&lt;?php
    include 'viewannouncement.php';
?&gt;
</code></pre>

<p>viewannouncement.php</p>

<pre><code>&lt;?php     
          $result = mysql_query("SELECT announcement_date,announcement_title,
          announcement_text FROM sp_announcement") or die(mysql_error());  

        echo "&lt;table id=\"newspaper-b\"&gt;";
        echo "&lt;thead&gt;";
        echo "&lt;tr&gt;";
        echo "&lt;th scope=\"col\"&gt;Date&lt;/th&gt;";
        echo "&lt;th scope=\"col\"&gt;Title&lt;/th&gt;";
        echo "&lt;th scope=\"col\"&gt;Announcement&lt;/th&gt;";
        echo "&lt;/tr&gt;";
        echo "&lt;/thead&gt;";

        while($row = mysql_fetch_array( $result )) {
                echo "&lt;tr&gt;";
                echo '&lt;td&gt;' . $row['announcement_date'] . '&lt;/td&gt;';
                echo '&lt;td&gt;' . $row['announcement_title'] . '&lt;/td&gt;';
                echo '&lt;td&gt;' . $row['announcement_text'] . '&lt;/td&gt;';
                echo "&lt;/tr&gt;"; 
        } 
        echo "&lt;/table&gt;";
        echo "&lt;br&gt;";
        echo "&lt;br&gt;";
?&gt;
</code></pre>

<p>in index.php it has a tab which includes and views  viewannouncement.php, the problem is when i access the subpages manually it leaves a whitescreen, how can i make it redirect to index.php and still be view able via the tabs in index.php</p>

<p>i hope you guys can help me, any help is greatly appreciated</p>
