PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The only thing I would do differently than feyd's link is use $_SERVER['SCRIPT_FILENAME'] instead of $_SERVER['PHP_SELF']. Otherwise, that is one tasty little treat of a function.