how to change /1.php to index.php?id=1
<pre><code>if (file_exists($filename)) {
echo "&lt;a class='next' href='$filename'&gt;&lt;img  src='images/next.png'&lt;/a&gt;";
} 
else {
echo "&lt;img src='images/next-dis.png'/&gt;";
}
</code></pre>

<hr>

<p>well i am trying to do this I will have hudereds of pages like 1.php 2.php 3.php.... but i want them to look like this "index.php?id=1" instead of /1.php, /2.php and want to block users who try to access (for eg.) 2.php directly.. can anyone help?.. is there any simple way to do this?</p>
