Click to See Complete Forum and Search --> : PHP_SELF not supported in PHP 5???


xkdavid
07-31-2004, 05:07 AM
PHP_SELF works in php4 but when i did a new installation of php5+apache2+mysql it gives me the following error


Forbidden
You don't have permission to access /<br /><b>Notice</b>: Undefined variable: PHP_SELF in <b>Y:/Server/Apache Group/Apache2/htdocs/register.php</b> on line <b>116</b><br /> on this server.


--------------------------------------------------------------------------------

Apache/2.0.50 (Win32) PHP/5.0.0 Server


and this is the part of the code of register.php

<form method="POST" action="<?php echo $PHP_SELF?>">

planetsim
07-31-2004, 05:10 AM
in PHP 5 register_globals is set to off by default

try $_SERVER['PHP_SELF']

xkdavid
07-31-2004, 07:21 AM
hey thanx it worked ^-^