My guestbook is based on one file.
Earlier today I got help regarding linking inside the file.
Well now I need more help regarding that.
Becuase people might wanna change the name of my file I added so it uses $_SERVER[PHP_SELF].
At the start of the file I set $gbpage to $_SERVER[PHP_SELF] and then in the file use it like this:
<?php echo $gbpage; ?>?id=1
The problem comes if people go first to id2 and then fron there to id4.
Then I want them to by one click or automatic refresh of the page get back to the start page.
Let's say the file name is index.php. Then they click a link to index.php?id=2 and from there index.php?id=4.
Then I want the page to go back to index.php.
But because I don't know what the filename is and $_SERVER[PHP_SELF] outputs index.php?id=4 I have a problem.
Can I somhow use the $_SERVER[PHP_SELF] and remove the ?id=4 automatic?