undefined variale: PHP_SELF
Moderator: General Moderators
undefined variale: PHP_SELF
Notice: Undefined variable: PHP_SELF in c:\apache\htdocs\user\login.php on line 37
this is the error i get every time i try and use $PHP_SELF. but, as i used to think, PHP_SELF doesnt need to be defined manualy.
and when i try and use
if ($submit) {
it says $submit is not set
(
Notice: Undefined variable: submit in c:\apache\htdocs\user\login.php on line 6
)
does this have anything to do with register globals? or is it a php problem after i installed it?
this is the error i get every time i try and use $PHP_SELF. but, as i used to think, PHP_SELF doesnt need to be defined manualy.
and when i try and use
if ($submit) {
it says $submit is not set
(
Notice: Undefined variable: submit in c:\apache\htdocs\user\login.php on line 6
)
does this have anything to do with register globals? or is it a php problem after i installed it?
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
register_globals has been deprecated, that means that it won't be available for you to turn on in future releases of PHP. So it's probably a good idea to learn how to code without relying on it being on now. It won't make your code more secure but it will make it slightly more difficult for you to write insecure code. You'll also be writing code that's easier for other people to read as it's more obvious where all your variables are coming from.
Please read this thread (where you should've started in the first place):
http://liberty.dnsprotect.com/~devnetwo ... .php?t=511
and check out the manual information on pre-defined variables
Mac
Please read this thread (where you should've started in the first place):
http://liberty.dnsprotect.com/~devnetwo ... .php?t=511
and check out the manual information on pre-defined variables
Mac
- hob_goblin
- Forum Regular
- Posts: 978
- Joined: Sun Apr 28, 2002 9:53 pm
- Contact:
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Even with register_globals off you can still run everything through the $_REQUEST array which since it is an "associative array consisting of the contents of $_GET, $_POST, $_COOKIE, and $_FILES" has the same problems associated with lack of security that register_globals on does. If you know what you're doing it's easy to write 'secure' code register_globals on or off, if you're just getting started having register_globals off will make it more difficult to write 'insecure' code but not impossible.
Mac
Mac
I've noticed this too. I'm glad I'm not the only onetwigletmac wrote:Even with register_globals off you can still run everything through the $_REQUEST array which since it is an "associative array consisting of the contents of $_GET, $_POST, $_COOKIE, and $_FILES" has the same problems associated with lack of security that register_globals on does.