Yes you are right. Indeed it displays index.php as $_SERVER['PHP_SELF']. But i still have a problem as i'm using index.php for an ajax script, and i actually need to get the name of the page calling the index.php.
So to use the real file names to avoid any further confusions, index.php is the main page. Somewhere in index.php i'm using ajax to call get_odds.php, which includes 1x2.inc.php. So, in 1x2.inc.php i'm using for links $_SERVER['PHP_SELF'] which will return the link as get_odds.php?something=xx.
Is it possible to get somehow the name of the page calling with ajax get_odds to php?