Thanks for the offer, but managed to get it working finally.
Did some tweaking and some experimenting and managed to get it to do exactly what I wanted. See, I needed it to recognise the full path, otherwise, the script got confused.
My index page at the root of my site is index.php and that handles all my site pages for me (data parsed to it via the url). So, by only passing the filename, the script couldn't tell the difference between index.php in my root folder and index.php in my forum folder.
But using some if statements inside the index case and using the userinfo[location] array, I was able to get it to direct the activity to the right cases.
But I couldn't have done it without your code. I didn't even know where to start, so again, thanks a bunch
PS. just to let you know, the first message was posted by Shari herself, but the rest were posted by me, Fred, the dude who does the coding on our sites ^_~ I just didn't have my own login for this forum.