Do not use $_SERVER['PHP_SELF']
I have seen many times that logos and links to a home page of a site use the following: <?php echo $_SERVER['PHP_SELF']?> Sadly, its is very dangerous because it might carry additional trailing data. This is specially an issue when doing SEO. For example: It will work fine for: /moo/daaa/boo.php It will possibly redirect to [...]
My name is Dan Merino. I specialize in research and development in web, mobile and IPTV. You can learn more about me at